Ant-design-pro: 请求方法为DELETE时,一直返回403

Created on 6 Jul 2018  ·  10Comments  ·  Source: ant-design/ant-design-pro

1、不使用mock,而且用request.js请求,报403: '用户得到授权,但是访问是被禁止的。'
2、使用mock,DELETE请求可能执行
3、直接通过postman测试,后台可以执行DELETE请求。

初次使用pro,请指教下怎么处理?先提前感谢。

Most helpful comment

竟然是后台禁止了跨域delete,抱歉了,占用您的时间,辛苦。您关掉我的issues吧。

All 10 comments

Translation of this issue:


When the request method is DELETE, it always returns 403

  1. Do not use mock, and request with request.js, report 403: 'User is authorized, but access is forbidden. '
    2, using mock, DELETE request may be executed
    3, directly through the postman test, the background can perform DELETE request.

The first time you use pro, please advise how to deal with it? Thanks in advance.

图?
chrome 截图

image

会不会是我的mock配置的问题?
image

image
这一步还可以,下一步直接403.

给个请求截图呗 你给代码没有用的

感觉是个低级错误

image

您看看这个。

image

image
可能是跨域??我问问后台设置没。。为啥post可以?

竟然是后台禁止了跨域delete,抱歉了,占用您的时间,辛苦。您关掉我的issues吧。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RichardStark picture RichardStark  ·  3Comments

cheung1111 picture cheung1111  ·  3Comments

suifan picture suifan  ·  3Comments

Jerry-goodboy picture Jerry-goodboy  ·  3Comments

zhuanglong picture zhuanglong  ·  3Comments