我正在使用
Vue js
开发一个应用程序。
根据我的设置,我需要在设置更改时将变量传递给我的 URL。
<!-- language: lang-js -->
$.get('http://172.16.1.157:8002/firstcolumn/' + c1v + '/' + c1b, function (data) {
// some code...
但是当我的应用点击 URL 时,它会显示以下消息。
Failed to load http://172.16.1.157:8002/firstcolumn/2017-03-01/2017-10-26: Redirect from 'http://172.16.1.157:8002/firstcolumn/2017-03-01/2017-10-26' to 'http://172.16.1.157:8002/firstcolumn/2017-03-01/2017-10-26/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
原文由 Parkar 发布,翻译遵循 CC BY-SA 4.0 许可协议