From 375c18a6d2713ff19b22093eec57315992d8333f Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期四, 06 十一月 2025 13:33:52 +0800
Subject: [PATCH] 增加评审下载
---
backend/src/main/java/com/rongyichuang/config/SecurityConfig.java | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/backend/src/main/java/com/rongyichuang/config/SecurityConfig.java b/backend/src/main/java/com/rongyichuang/config/SecurityConfig.java
index 1ae6ced..92af34a 100644
--- a/backend/src/main/java/com/rongyichuang/config/SecurityConfig.java
+++ b/backend/src/main/java/com/rongyichuang/config/SecurityConfig.java
@@ -48,9 +48,12 @@
.csrf(csrf -> csrf.disable())
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth
- .requestMatchers("/api/auth/**", "/api/actuator/**", "/api/test/**", "/api/cleanup/**").permitAll()
- .requestMatchers("/api/graphql", "/api/graphql/**", "/api/graphiql").permitAll()
- .requestMatchers("/graphql", "/graphql/**").permitAll()
+ // 娉ㄦ剰锛氬簲鐢ㄨ缃簡 context-path=/api锛屼负閬垮厤鍖归厤姝т箟锛岃繖閲屽悓鏃跺尮閰嶅幓闄ゅ拰鍖呭惈 context-path 鐨勮矾寰�
+ .requestMatchers("/auth/**", "/api/auth/**", "/actuator/**", "/test/**", "/cleanup/**").permitAll()
+ .requestMatchers("/api/health/**").permitAll() // 鍏佽鍋ュ悍妫�鏌ョ鐐硅闂�
+ .requestMatchers("/upload/**").permitAll()
+ .requestMatchers("/graphiql/**", "/graphql/**", "/api/graphql/**", "/api/graphiql/**").permitAll() // 鍏佽GraphQL鍜孏raphiQL璁块棶
+ .requestMatchers("/**/graphql", "/**/graphiql").permitAll() // 鏇村娉涚殑GraphQL璺緞鍖归厤
.anyRequest().authenticated()
)
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
--
Gitblit v1.8.0