You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Retrieving data from the API programmatically from localhost throws CORS exceptions.
Access to XMLHttpRequest at 'https://covid-za-api.herokuapp.com/cases/confirmed' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
To Reproduce
Steps to reproduce the behavior:
Attempt to retrieve data programmatically
Data retrieval from API fails because of CORS
Expected behavior
Expect to be able to retrieve data from the API.
Screenshots
The text was updated successfully, but these errors were encountered:
I can confirm that the CORS header is now sent correctly. A simple test can be performed by serving the below HTML file using Python's SimpleHTTPServer for example:
When navigating to http://localhost:8000/covid19za_56_test.html, the response received contains the Access-Control-Allow-Origin: * header, and the data is retrieved successfully.
Describe the bug
Retrieving data from the API programmatically from localhost throws CORS exceptions.
Access to XMLHttpRequest at 'https://covid-za-api.herokuapp.com/cases/confirmed' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect to be able to retrieve data from the API.
Screenshots
The text was updated successfully, but these errors were encountered: