From e08fd847392ebb56483dc3e3a434894a0e35e041 Mon Sep 17 00:00:00 2001 From: Subi Hwang Date: Sun, 14 Jan 2024 17:01:11 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20SecurityConfig=20=EC=88=98=EC=A0=95#9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oot/swagger/SecurityConfig.java | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/main/java/com/endlesshorses/oot/swagger/SecurityConfig.java diff --git a/src/main/java/com/endlesshorses/oot/swagger/SecurityConfig.java b/src/main/java/com/endlesshorses/oot/swagger/SecurityConfig.java deleted file mode 100644 index a2f9c2f..0000000 --- a/src/main/java/com/endlesshorses/oot/swagger/SecurityConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.endlesshorses.oot.swagger; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.web.SecurityFilterChain; - -@Configuration -@EnableWebSecurity -public class SecurityConfig { - private static final String[] AUTH_WHITELIST = { - "/api/**", "/graphiql", "/graphql", - "/swagger-ui/**", "/api-docs", "/swagger-ui-custom.html", - "/v3/api-docs/**", "/api-docs/**", "/swagger-ui.html" - }; - - @Bean - public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - return httpSecurity - .authorizeHttpRequests( - authorize -> authorize - .shouldFilterAllDispatcherTypes(false) - .requestMatchers(AUTH_WHITELIST) - .permitAll() - .anyRequest() - .authenticated() - ) - .httpBasic().disable() - .formLogin().disable() - .cors().disable() - .csrf().disable() - .build(); - } - -} \ No newline at end of file