?Access to XMLHttpRequest at 'http://xxx/user/getAll/1/1' from origin 'http://127.0.0.1:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
網上找到一個方法:
大概就是,chrome安全策略的原因,chrome 禁止跨域策略(CORS policy)?
新建一個?禁止cors跨域相關的策略的?chrome,
1.桌面新建一個快捷方式:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ,為chrome的路徑。文章來源:http://www.zghlxwxcb.cn/news/detail-817495.html
2.創(chuàng)建完成,使用該chrome訪問即可。
?文章來源地址http://www.zghlxwxcb.cn/news/detail-817495.html
到了這里,關于has been blocked by CORS policy: No ‘Access-Control-Allow-Origin‘ header is present on the requested的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!