mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-04 19:17:27 +08:00
[O] CORS allow all
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user