Skip to content

Commit

Permalink
Fix: 클라이언트 배포용 CORS url 수정
Browse files Browse the repository at this point in the history
Fix: 클라이언트 배포용 CORS url 수정
  • Loading branch information
sansan20535 authored Jan 23, 2025
2 parents 90520ec + eef8638 commit 448a551
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/cocos/cocos/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static CorsConfigurationSource corsConfigurationSource() {
ArrayList<String> allowedOriginPatterns = new ArrayList<>();
allowedOriginPatterns.add("http://localhost:5173");
allowedOriginPatterns.add("https://www.cocos.r-e.kr/");
allowedOriginPatterns.add("https://cocos-pet.kr/");
allowedOriginPatterns.add("https://www.cocos-pet.kr/");
configuration.setAllowedOrigins(allowedOriginPatterns);

//허용하는 HTTP METHOD 지정
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cocos/cocos/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void addFormatters(FormatterRegistry registry) {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("http://localhost:5173/", "https://www.cocos.r-e.kr/", "https://cocos-pet.kr/")
.allowedOrigins("http://localhost:5173/", "https://www.cocos.r-e.kr/", "https://www.cocos-pet.kr/")
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")
.allowCredentials(true);
}
Expand Down

0 comments on commit 448a551

Please sign in to comment.