我有一个使用put方法进行跨域操作资源的请求,请求之前发送了options预请求,在返回头里面可以看到Access-Control-Allow-Origin是我当前的域。
但是接下来的put请求却遇到了跨域失败,错误如下:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxxxxx.com' is therefore not allowed access. The response had HTTP status code 400.
再补充一点,这个情况只有在我的机器上遇到,同事的就不会,chrome版本Version 49.0.2623.110 (64-bit)
请问各位大神这是什么原因导致的?
已解决,前端的处理没有问题,是服务端有自己的逻辑处理,希望大家不要被误导
你先把Access-Control-Allow-Origin设置成*试试看行不行