Skip to content

Commit

Permalink
Merge pull request #97 from cathaaaaand/dev
Browse files Browse the repository at this point in the history
CORS ์ •์ฑ… ์ˆ˜์ •
  • Loading branch information
EUNCHAEv1006 authored Apr 29, 2024
2 parents b9acef1 + 7881314 commit f5a763c
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.util.List;
import java.util.Arrays;

@Configuration
@RequiredArgsConstructor
Expand All @@ -42,10 +42,7 @@ public JwtAuthorizationFilter jwtAuthorizationFilter() {
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowCredentials(true);

// TODO: ์‹ค์ œ ๋ฐฐํฌ ํ™˜๊ฒฝ์—์„œ๋Š” ๊ตฌ์ฒด์ ์ธ ๋„๋ฉ”์ธ์œผ๋กœ ์ œํ•œํ•ด์•ผ ํ•จ
configuration.setAllowedOrigins(List.of("http://localhost:3000", "https://www.wooriforei.info"));

configuration.setAllowedOriginPatterns(Arrays.asList("http://localhost:3000", "https://www.wooriforei.info"));
configuration.addAllowedHeader("*");
configuration.addAllowedMethod("*");

Expand Down

0 comments on commit f5a763c

Please sign in to comment.