baires/shouldideploy

Fix Access-Control-Allow-Origin (CORS) Header

AntoineKM opened this issue · 0 comments

To reproduce:

  1. Make a simple React app
  2. Make a request to https://shouldideploy.today/api inside this app
  3. You'll get this error:
Access to fetch at 'https://shouldideploy.today/api' from origin 'http://localhost:3002' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Expected Behavior
Allowing requests from all origins