rbuchmeier / nordicNumbers

0 stars 0 forks source link

API request fails locally #39

Closed rbuchmeier closed 7 years ago

rbuchmeier commented 7 years ago

So if we build from anywhere other than the server, we get the following error:

XMLHttpRequest cannot load http://192.81.218.23:3000/api/races. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

Kind of annoying...I suspect the answer has something to do with the Cors module...could be an interesting problem.

rbuchmeier commented 7 years ago

f648f39a2a308543c1d639917790f84f7f2880eb - Added CORS to server responses. Should work for all local developments now.