请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

我使用posman发送delete请求被403,请问这是哪里出了问题?我使用的是2.x版本

正在回答 回答被采纳积分+3

1回答

JoJo 2018-12-19 16:18:39

403是没权限,一般情况下是认证通过了,但是访问的请求没有被授权会返回这个,具体要看你的代码和配置。

1 回复 有任何疑惑可以回复我~
  • 提问者 0nce_ #1
    已解决,由于spring boot引入spring security后默认开启csrf拒绝访问post put delete操作,而2.x已经废弃security.enable,所以需要自己实现关闭
    Since Spring Boot relies on Spring Security’s defaults, CSRF protection is turned on by default. This means that the actuator endpoints that require a POST (shutdown and loggers endpoints), PUT or DELETE will get a 403 forbidden error when the default security configuration is in use.
    回复 有任何疑惑可以回复我~ 2018-12-19 16:34:04
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信