0

I am creating my first web app and hosting it on Heroku's free version. It is an NBA statistics site and so as part of my application I make a call to a remote API to retrieve the stats for a certain player. When I run this on the local server via the 'heroku local' command my app works as intended with the call being able to be done in just a second or two. When I launch the app on the production server using the 'git push' command everything on my site works normal except when I attempt to make this call, it never finishes and I receive a timeout error. Does anybody know the cause of this issue and how I can fix it? Thanks

  • It could be a CORS security issue. `Access-Control-Allow-Methods = PUT, GET, POST, DELETE, OPTIONS` – eatmeimadanish Sep 14 '20 at 22:15
  • @Mweiner, unfortunately NBA has blacklisted cloud hosting providers such as Amazon AWS, Digital Ocean, and Heroku. This has been answered [here](https://github.com/swar/nba_api/issues/176#issuecomment-771991604). Your best chances are to set up a proxy so that your API calls come from the proxy and not Heroku. – Jaume Clave Feb 02 '21 at 21:37

0 Answers0