如何解决“重定向已被CORS策略阻止:没有'访问控制-允许-来源'标头”?
2022-08-30 04:09:23
我正在使用 .根据我的设置,我需要在设置更改时将变量传递给我的URL。Vue js
<!-- 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.