[Vuejs]-CORS – multiple values in Access-Control-Allow-Origin

0πŸ‘

This is a server-side issue. You need to enable CORS in your apache config, by either:

  1. Setting Header set Access-Control-Allow-Origin "*" – meaning that all origins are allowed to make requests to this server
  2. Setting Header set Access-Control-Allow-Origin "http://localhost:3000"

This tells the server to accept requests from this origin(s), to further explain.

https://enable-cors.org/server_apache.html

0πŸ‘

Change your header set statement to:

Header always set Access-Control-Allow-Origin β€œ*”

Otherwise Apache will prepend origin in request to the header, which causes the issue.

Leave a comment