邮递员localhost代理在执行XHR调用时给出了CORS错误

时间:2019-01-13 13:44:36

标签: proxy cors postman

我已经使用Postman从localhost:4444->具有API的远程服务器创建了一个代理。远程服务器已启用CORS-任何主机都可以执行OPTIONS,GET,POST等操作。 enter image description here 现在,当我在localhost:8080上运行前端应用程序并对X localhost:4444进行XHR调用时,我会遇到典型的CORS错误:

http://localhost:8080/#/profile:1 Access to XMLHttpRequest at 'http://localhost:4444/auth/me' 
from origin 'http://localhost:8080' has been blocked by CORS policy: 
Response to preflight request doesn't pass access control check: 
No 'Access-Control-Allow-Origin' header

但是呼叫已在Postman UI中注册: enter image description here

我希望人们可以向Postman注册各种服务器<->客户端对的请求/响应。

我做错了什么?

0 个答案:

没有答案