Skip to content

Commit 256d177

Browse files
committed
feat: cors 전체 허용
1 parent 13bec82 commit 256d177

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/example/busan/common/config/WebConfigurer.java

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.example.busan.auth.AuthorizationArgumentResolver;
44
import org.springframework.context.annotation.Configuration;
55
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
6+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
67
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
78

89
import java.util.List;
@@ -20,4 +21,10 @@ public WebConfigurer(final AuthorizationArgumentResolver resolver) {
2021
public void addArgumentResolvers(final List<HandlerMethodArgumentResolver> resolvers) {
2122
resolvers.add(resolver);
2223
}
24+
25+
@Override
26+
public void addCorsMappings(final CorsRegistry registry) {
27+
registry.addMapping("/**")
28+
.allowedMethods("*");
29+
}
2330
}

0 commit comments

Comments
 (0)