Skip to content

Commit

Permalink
Merge pull request #33 from doghae/Feat/issue#14
Browse files Browse the repository at this point in the history
Fix: Cors
  • Loading branch information
LSBsity authored Aug 4, 2024
2 parents ca32d74 + c4169e2 commit 048c1b9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/java/team5/doghae/common/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public class WebConfig implements WebMvcConfigurer {

private final AuthUserArgumentResolver authUserArgumentResolver;

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOriginPatterns("https://doghae.vercel.app/")
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("Authorization", "Content-Type", "X-Requested-With", "Accept", "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers")
.allowCredentials(true)
.maxAge(3600);
}
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// registry.addMapping("/**")
// .allowedOriginPatterns("https://doghae.vercel.app/")
// .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
// .allowedHeaders("Authorization", "Content-Type", "X-Requested-With", "Accept", "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers")
// .allowCredentials(true)
// .maxAge(3600);
// }

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
Expand Down

0 comments on commit 048c1b9

Please sign in to comment.