package com.project.zcustom.config;

import org.springframework.context.annotation.Bean;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;

/**
 * @Description
 * @Author bqyang
 * @Date 2025/2/26 16:54
 * @Version 1.0
 */
@EnableWebSecurity
public class SecurityConfig {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        http
                .authorizeRequests()
                .anyRequest().permitAll() // 允许所有请求通过
                .and()
                .csrf().disable(); // 禁用 CSRF 保护
        return http.build();
    }
}
