Skip to content

Commit

Permalink
Merge pull request #53 from Louie-03/BE-feature-cors_bug_fix
Browse files Browse the repository at this point in the history
[BE] 도메인 설정으로 CORS 문제 해결
  • Loading branch information
Louie-03 committed Apr 27, 2022
2 parents 947bdca + c8826e0 commit 05b9d52
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
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 05b9d52

Please sign in to comment.