Skip to content

Commit

Permalink
Merge pull request #612 from woowacourse-teams/revert-608-refactor/59…
Browse files Browse the repository at this point in the history
…4-cors-config-remove

Revert "cors 설정을 스프링 코드에서 제거"
  • Loading branch information
kyum-q authored Sep 6, 2024
2 parents 9bda868 + 80a62ef commit 7b9e50b
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package codezap.global.cors;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebCorsConfiguration implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowCredentials(true)
.allowedOriginPatterns("https://*.code-zap.com")
.allowedOrigins("https://code-zap.com")
.allowedMethods("*")
.exposedHeaders("*");
}
}

0 comments on commit 7b9e50b

Please sign in to comment.