Tuesday 25 February 2020

Issue with CORS, domain, "No 'Access-Control-Allow-Origin' header is present on the requested resource."

Hi all, I have a Node/Express app deployed to Heroku. It works great there, however I bought a domain for it and when I try and access the application there I get a CORS issue.Access to XMLHttpRequest at 'https://myapp.herokuapp.com/getPosts' from origin 'https://myapp.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. However, I have CORS set up on my server.app.use(cors({ credentials: true, origin: ['https://myapp.app/', 'https://www.myapp.app/', 'http://localhost:3000'] })); Everything appears to be set up properly. Has anyone seen this issue before? Any help would be greatly appreciated. Thanks!

Submitted February 26, 2020 at 02:08AM by macswaggerrrr

No comments:

Post a Comment