File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
java/com/daramg/server/auth Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
3535 .headers (headers -> headers .frameOptions (frame -> frame .sameOrigin ())) // ์ถ๊ฐ: h2 db ์ ๊ทผ
3636 .sessionManagement (session -> session .sessionCreationPolicy (SessionCreationPolicy .STATELESS ))
3737 .authorizeHttpRequests (auth -> auth
38+ /**
39+ * CORS preflight ์์ฒญ ํ์ฉ
40+ */
41+ .requestMatchers (HttpMethod .OPTIONS , "/**" ).permitAll ()
42+
3843 /**
3944 * ์ธ์ฆ ์์ด ํ์ฉํ ๊ฒฝ๋ก
4045 */
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ public class JwtAuthorizationFilter extends OncePerRequestFilter {
3838 @ Value ("${cookie.access-name}" )
3939 public String ACCESS_COOKIE_NAME ;
4040
41+ @ Override
42+ protected boolean shouldNotFilter (@ NotNull HttpServletRequest request ) {
43+ return "OPTIONS" .equalsIgnoreCase (request .getMethod ());
44+ }
45+
4146 @ Override
4247 protected void doFilterInternal (@ NotNull HttpServletRequest request ,
4348 @ NotNull HttpServletResponse response ,
Original file line number Diff line number Diff line change 4545 - " https://classic-daramg.duckdns.org"
4646 - " https://client-amber-sigma.vercel.app"
4747 - " https://client-kwongeonwoos-projects.vercel.app"
48+ - " https://www.classicaldaramg.com"
49+ - " https://classicaldaramg.com"
4850 - " https://www.classicaldaramz.com"
4951 - " https://classicaldaramz.com"
You canโt perform that action at this time.
0 commit comments