Skip to content

Commit

Permalink
Merge pull request #71 from team-Ollie/fix/28-cors
Browse files Browse the repository at this point in the history
[fix/28-cors] allowedOrigins에 배포 url 추가 수정
  • Loading branch information
JoongHyun-Kim authored Jun 27, 2024
2 parents 4817a6d + 1c77dd0 commit 0a69f97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WebConfiguration implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE")
.allowedOrigins("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE", "https://team-ollie.github.io")
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class WebSecurityConfiguration {
CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedHeaders(List.of("*"));
configuration.setAllowedOrigins(List.of("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE"));
configuration.setAllowedOrigins(List.of("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE", "https://team-ollie.github.io"));
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
configuration.setAllowCredentials(true);
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
Expand Down

0 comments on commit 0a69f97

Please sign in to comment.