Skip to content

Commit

Permalink
Fix: 도메인 설정으로 인한 CORS 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Louie-03 committed Apr 27, 2022
1 parent 947bdca commit c8826e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BE/src/main/java/sidedish/com/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ public void addCorsMappings(CorsRegistry registry) {
Map<String, String> envs = System.getenv();
String awsIp = "http://" + envs.get("AWS_IP");
String localIp = "http://" + envs.get("LOCAL_IP");
String dnsName = envs.get("DNS_NAME");

registry.addMapping("/**")
.allowedOrigins(localIp, awsIp);
.allowedOrigins(localIp, awsIp, dnsName);
}
}

0 comments on commit c8826e0

Please sign in to comment.