Skip to content

Commit

Permalink
Merge pull request #238 from ShallWeProject/develop
Browse files Browse the repository at this point in the history
main <- develop
  • Loading branch information
leeseunghakhello authored Jan 22, 2024
2 parents bdef036 + ac5d067 commit 8f4b51e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/com/shallwe/global/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // url 패턴
.allowedOriginPatterns("*")
// todo: server url 생성 시 변경 필요
// .allowedOrigins("url:8080", "http://localhost:8080")
.allowedOrigins("https://api.shallwes.com/")
.allowedMethods(HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PATCH.name(), HttpMethod.DELETE.name(), HttpMethod.OPTIONS.name(),
HttpMethod.HEAD.name(), HttpMethod.TRACE.name(), HttpMethod.OPTIONS.name()) // 허용 method
.allowedHeaders("Authorization", "Content-Type"); // 허용 header
.allowedHeaders("Authorization", "Content-Type")// 허용 header
.allowCredentials(true);


}
}

0 comments on commit 8f4b51e

Please sign in to comment.