Skip to content

Commit

Permalink
Merge pull request #208 from Troth-Cam/fix/product
Browse files Browse the repository at this point in the history
fix(#125) : cors 설정
  • Loading branch information
aeeazip authored Aug 22, 2023
2 parents 655bdfd + 6feceed commit dad82e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/trothly/trothcam/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ protected CorsConfigurationSource corsConfigurationSource() {

private CorsConfiguration getDefaultCorsConfiguration() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOriginPatterns(
configuration.setAllowedOrigins(
Arrays.asList("http://localhost:8080", "https://trothly.com", "http://localhost:3000"));
configuration.setAllowedHeaders(Arrays.asList("*")); // 모든 header 에 응답을 허용
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "PATCH")); // 모든 get,post,patch,put,delete 요청 허용
// configuration.setAllowedOrigins(Arrays.asList("*")); // 모든 ip 응답을 허용
configuration.setAllowedOrigins(Arrays.asList("*")); // 모든 ip 응답을 허용
configuration.setAllowCredentials(true); // 내 서버가 응답할 때 json 을 자바스크립트에서 처리할 수 있게 할지를 설정하는 것
configuration.setMaxAge(3600L);

Expand Down

0 comments on commit dad82e2

Please sign in to comment.