From 668a3e01524e565a7fe71d5297d4ec3dafa4c83a Mon Sep 17 00:00:00 2001 From: Kwon Min A Date: Sat, 25 Nov 2023 17:39:14 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20CORS=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/efub/dhs/global/config/SecurityConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/efub/dhs/global/config/SecurityConfig.java b/src/main/java/com/efub/dhs/global/config/SecurityConfig.java index fccf57e..96ca749 100644 --- a/src/main/java/com/efub/dhs/global/config/SecurityConfig.java +++ b/src/main/java/com/efub/dhs/global/config/SecurityConfig.java @@ -32,6 +32,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .authorizeRequests() + .antMatchers(HttpMethod.OPTIONS).permitAll() .antMatchers("/programs/created", "/programs/liked", "/programs/registered", @@ -39,7 +40,6 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws "/auth/logout").authenticated() .antMatchers("/auth/**", "/oauth/**").permitAll() .antMatchers(HttpMethod.GET).permitAll() - .antMatchers(HttpMethod.OPTIONS).permitAll() .anyRequest().authenticated() .and() .addFilterBefore(new JwtFilter(jwtAuthProvider), UsernamePasswordAuthenticationFilter.class)