zhou zhou
16 小时以前 5454bbe86b1a22e9f05b6bc43f7ed7e9d6c4dc14
rsf-server/src/main/java/com/vincent/rsf/server/common/security/SecurityConfig.java
@@ -17,6 +17,7 @@
import org.springframework.stereotype.Component;
import jakarta.servlet.ServletException;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.annotation.Resource;
@@ -54,8 +55,8 @@
            "/ws/**",
            "/wcs/**",
            "/monitor/**",
            "/ai/mcp/**",
            "/mcp/**",
            "/ai/mcp",
            "/mes/**"
    };
@@ -70,8 +71,9 @@
    public SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
            throws Exception {
        http.authorizeHttpRequests(authorize -> authorize
                        .dispatcherTypeMatchers(DispatcherType.ASYNC, DispatcherType.ERROR).permitAll()
                        .requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
                        .requestMatchers(HttpMethod.GET, "/file/**", "/captcha", "/").permitAll()
                        .requestMatchers(HttpMethod.GET, "/file/**", "/captcha", "/", "/config/public/project-logo", "/config/public/project-copyright").permitAll()
                        .requestMatchers(FILTER_PATH).permitAll()
                        .anyRequest().authenticated())
                .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))