kvillt / psa

Practical Statistics Application
0 stars 0 forks source link

Fix CORS Issue #8

Closed kvillt closed 3 years ago

kvillt commented 3 years ago

Access to XMLHttpRequest at 'http://68.183.74.23:5000/api/post_data' from origin 'http://68.183.74.23:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

CORS policy does not allow sites to access data from another domain in a suspicious manner, we have to fix this to be able to get data from the flask-server without having the CORS-extension installed.

https://web.dev/cross-origin-resource-sharing/

kvillt commented 3 years ago

https://dev.to/matheusguimaraes/fast-way-to-enable-cors-in-flask-servers-42p0