Skip to content

Commit

Permalink
fix: cors disable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongh00 committed Jul 15, 2024
1 parent 2a86239 commit 5adb3a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public BCryptPasswordEncoder bCryptPasswordEncoder() {
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {

http
.cors(cors -> cors
.configurationSource(CorsConfig.apiConfigurationSource()));
.cors(AbstractHttpConfigurer::disable);

// csrf disable
http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public static CorsConfigurationSource apiConfigurationSource() {

ArrayList<String> allowedOriginPatterns = new ArrayList<>();
allowedOriginPatterns.add("http://localhost:8080");
allowedOriginPatterns.add("https://localhost:8080");
allowedOriginPatterns.add("http://localhost:3000");
allowedOriginPatterns.add("https://localhost:3000");
allowedOriginPatterns.add("https://syluv.link");

ArrayList<String> allowedHttpMethods = new ArrayList<>();
Expand Down

0 comments on commit 5adb3a6

Please sign in to comment.