天天看點

No ‘Access-Control-Allow-Origin‘ header is present on the requested resource

遇到問題

No ‘Access-Control-Allow-Origin‘ header is present on the requested resource

 翻譯錯誤

被CORS政策阻止了:

請求的資源上沒有'Access-Control-Allow-Origin'頭

CORS是一個W3C标準,全稱是"跨域資源共享"(Cross-origin resource sharing)。

它允許浏覽器向跨源伺服器,發出

XMLHttpRequest

請求,進而克服了AJAX隻能同源使用的限制。

需從背景伺服器解決跨域問題

繼續閱讀