Skip to content

Commit

Permalink
choe: 프론트엔드 도메인 cors 설정에 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hseong3243 committed Feb 7, 2024
1 parent d16c69c commit 7d4b728
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(
new JwtAuthenticationInterceptor(jwtAuthenticationProvider, authenticationContext))
new JwtAuthenticationInterceptor(jwtAuthenticationProvider, authenticationContext))
.order(1)
.addPathPatterns("/api/**");
}
Expand All @@ -35,7 +35,11 @@ public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers)
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("http://localhost:3000", "https://shoutlink.me")
.allowedOrigins(
"http://localhost:3000",
"https://shoutlink.me",
"https://www.shoutlink.me",
"https://shout-link-front.vercel.app")
.allowedMethods("GET", "POST", "PATCH", "DELETE", "OPTIONS")
.allowCredentials(true);
}
Expand Down

0 comments on commit 7d4b728

Please sign in to comment.