THP-2-0 / THP2_back

24 stars 6 forks source link

Cors config #69

Open zaratan opened 6 years ago

zaratan commented 6 years ago

Why ?

For now, everything is wonderful and your api live in its own world. But soon™ it will need to talk to a JS page that will probably live in an other domain.

For example your API could be accessible at:

api.my_nice_service.com

Your JS front at:

www.my_nice_service.com

As soon as you will want to make a new query to your API from your front:

Failed to load https://api.my_nice_service.com/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.my_nice_service.com/ with MIME type text/html.

Must have

Todo

Reading list