我们有一个使用谷歌应用引擎托管的项目(包含网络后端和移动api后端)(我们也使用云端点)。
我们使用spring框架进行Web应用程序,mvc&安全
现在的问题是,一旦我在<csrf/>
中启用security.xml
,云端点项目也会因此设置而需要令牌。
<http auto-config="true">
<intercept-url pattern="/" access="ROLE_USER" />
<form-login
login-page="/login"
default-target-url="/welcome"
authentication-failure-url="/login?error"
username-parameter="email"
password-parameter="password" />
<logout logout-success-url="/login?logout" />
<!-- enable csrf protection -->
<!-- <csrf/> -->
</http>
是否可以仅配置某个文件夹或某个控制器需要此<csrf/>
保护?因为我只想要这个csrf
设置来保护我的网络后端。