refactor(config): 简化安全配置允许所有请求访问
All checks were successful
test/timeline-server/pipeline/head This commit looks good
All checks were successful
test/timeline-server/pipeline/head This commit looks good
移除原有的路径匹配规则,将所有 HTTP 请求设置为 permitAll。此更改通常用于开发阶段或内部微服务调试,以简化身份验证流程。
This commit is contained in:
@@ -15,9 +15,7 @@ public class SecurityConfig {
|
|||||||
http
|
http
|
||||||
.csrf(csrf -> csrf.disable())
|
.csrf(csrf -> csrf.disable())
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/public/**").permitAll()
|
.anyRequest().permitAll());
|
||||||
.anyRequest().authenticated()
|
|
||||||
);
|
|
||||||
return http.build();
|
return http.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user