Skip to content

Commit

Permalink
feat: add cors configuration (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
woowabrie authored May 11, 2022
1 parent 0c0afd6 commit 9b68357
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/wooteco/subway/WebConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package wooteco.subway;

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 WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedMethods("*").allowedOriginPatterns("*");
}
}

0 comments on commit 9b68357

Please sign in to comment.