fix(file-service): permit /error endpoint to avoid 401 on server errors
Spring Boot's /error handler was secured, causing any server-side exception during upload/serve to redirect clients to login instead of returning an error message. Permitting /error ensures errors are returned as proper JSON responses rather than auth challenges. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
8bc9b1ebda
当前提交
9c51e666f8
@ -40,6 +40,7 @@ public class SecurityConfig {
|
||||
.requestMatchers(new AntPathRequestMatcher("/api/file/*/thumbnail", "GET")).permitAll()
|
||||
.requestMatchers(new AntPathRequestMatcher("/api/file/*", "GET")).permitAll()
|
||||
.requestMatchers(new AntPathRequestMatcher("/actuator/**", "GET")).permitAll()
|
||||
.requestMatchers(new AntPathRequestMatcher("/error")).permitAll()
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
.exceptionHandling(ex -> ex
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户