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