Expected behavior
The API should return the result even when running on localhost.
Proposed Solution
Maybe this has to do something with HTACCESS File. It's a server side issue. In all the Stack Overflow Answers I have seen, this is the most proposed and the most popular solution. For example, see this Stack Overflow Answer
Desktop (please complete the following information):
OS: IOS
Browser: Chrome
Version: 90.0.4430.93
Smartphone (please complete the following information):
NA
Additional context
Please look into this issue as soon as possible as it is blocking my development.
Describe the bug Related to this issue. I got this error while trying to access the api url: https://life-pipeline.coronasafe.network/api/resources?resource=SOMERESOURCE&state=SOMESTATE&district=SOMEDISTRICT as referenced on this page.
Note: Replace the capital words with resource, state and district respectively.
Error Access to XMLHttpRequest at 'https://life-pipeline.coronasafe.network/api/resources?resource=oxygen&state=delhi_(nct)&district=new_delhi' from origin 'http://localhost:53922' has been blocked by CORS policy.
Note: The api works if we hit it from the search bar of chrome or from postman but it doesn't work when hitting from localhost
To Reproduce Steps to reproduce the behavior:
Expected behavior The API should return the result even when running on localhost.
Proposed Solution Maybe this has to do something with HTACCESS File. It's a server side issue. In all the Stack Overflow Answers I have seen, this is the most proposed and the most popular solution. For example, see this Stack Overflow Answer
Desktop (please complete the following information):
Smartphone (please complete the following information): NA
Additional context Please look into this issue as soon as possible as it is blocking my development.