Open sasikanthtadimalla opened 2 years ago
Hi @sasikanthtadimalla , It will not work on Heroku because it is restricted to Indian IP, There is a workaround, But you will have to set up the proxy for the server using this package. I am currently using it for accessing the data from Heroku, And it does work, but you will need a system running in India for the proxy server, If not you can try getting AWS Mumbai or google cloud's Bangalore server.
I am using NodeJS and axios.
I am simply making a GET request to this API: https://cdn-api.co-vin.in/api/v2/admin/location/states
I am getting the data properly in localhost, postman, as well as simple browser request.
When I make the same request using axios in nodeJS, it works on localhost. But if I deploy it to heroku and then make the request, it fails with the error 403.
Why is this happening?
Here's the code:
Here's the error:
I again repeat, I am facing this only while making the request from heroku. It is working well on localhost.