mirror of https://github.com/hykilpikonna/AquaDX
[O] CORS allow all
parent
7e9db5b52d
commit
94a3234874
|
@ -2,6 +2,7 @@ package icu.samnyan.aqua.security.config;
|
|||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.Customizer;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
@ -33,7 +34,7 @@ public class SecurityConfig {
|
|||
@Bean
|
||||
public SecurityFilterChain configure(HttpSecurity http) throws Exception {
|
||||
http.headers(headers -> headers.disable())
|
||||
.cors(cors -> cors.disable())
|
||||
.cors(Customizer.withDefaults())
|
||||
.csrf(csrf -> csrf.disable())
|
||||
.authorizeHttpRequests(authorize -> authorize.anyRequest().permitAll());
|
||||
|
||||
|
|
Loading…
Reference in New Issue