How to solve ‘Redirect has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header’?


I am working on an app using Vue js.
According to my setting I need to pass to a variable to my URL when setting change.

<!-- language: lang-js -->

    $.get('' + c1v + '/' + c1b, function (data) { 
      // some code...

But when my app hit on URL, it shows the following message.

Failed to load Redirect from '' to '' 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.


In addition to what awd mentioned about getting the person responsible for the server to reconfigure (an impractical solution for local development) I use a change-origin chrome plugin like this:

Moesif Orign & CORS Changer

You can make your local dev server (ex: localhost:8080) to appear to be coming from or any other domain.


Leave a Reply

Your email address will not be published. Required fields are marked *