我正在构建一个用户注册表单。我有POST
注册端点,我能够成功注册。
我有另一个端点/invalid-token
,它也映射到POST
映射。我已将两个端点添加到permitAll
规则中,如下所示:
http.authorizeRequests()
.antMatchers(
"/register",
"/confirm",
"/invalid-token",
"/registration-success")
.permitAll()
.anyRequest()
.authenticated();
当我从浏览器POST
向 发出请求时invalid-token
,我得到一个403
. 我不明白我哪里出错了。
Response Status:
General:
Request URL: http://localhost:8081/invalid-token
Request Method: POST
Status Code: 403
Remote Address: [::1]:8081
Referrer Policy: no-referrer-when-downgrade
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 0
Date: Tue, 23 Apr 2019 05:14:30 GMT
Expires: 0
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block