简体   繁体   中英

Postman Works but not in Ajax Request

I've an issue with my request, the POST i set in Postman work as well, but not work in Ajax Call, that console say me cors is unable from localhost.

Postman & Ajax Call Screen

Postman acts more like a server, and bypasses CORS.

CORS blocks request from different origins if the server don't allow other domains to access a resource, read more about CORS here https://web.dev/cross-origin-resource-sharing/

To summarize, the server does not allow you to make the request from the browser, it misses the Access-Control-Allow-Origin http header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM