This commit is contained in:
ran.shang
2026-04-08 09:26:57 +08:00
parent 52356bdc2e
commit 1f52669b52

View File

@@ -151,6 +151,8 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
// 禁用CSRF
// http.csrf().disable();
http.csrf(c -> c.ignoringAntMatchers("/login")) // 登录接口免 CSRF
;
http.headers().frameOptions().deny();
http.headers().xssProtection().block(true);
http.headers().contentTypeOptions();