之前碰到跨域問(wèn)題,后端設(shè)置header即可
header("Access-Control-Allow-Origin: * ");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
這次設(shè)置后還是報(bào)錯(cuò)
Access to XMLHttpRequest at 'http://172.27.XX.XX/api/push/getEventDetail?id=1' from origin 'http://www.XXX.com' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `private`.
通過(guò)stackoverflow上的文章,跨域報(bào)錯(cuò),暫時(shí)解決

image.png