Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS Issue: #45

Open
dromerosalem opened this issue May 21, 2023 · 5 comments
Open

CORS Issue: #45

dromerosalem opened this issue May 21, 2023 · 5 comments

Comments

@dromerosalem
Copy link

The "Access to XMLHttpRequest at 'https://goweather.herokuapp.com/weather/{city}' from origin 'https://dromerosalem.github.io/' has been blocked by CORS policy" error indicates that the API trying to access does not allow cross-origin requests from your deployed GitHub Pages site. This is a security measure enforced by the server hosting the API.

Is it possible to enable CORS so we can deploy at GitHub pages.

@robertoduessmann
Copy link
Owner

Thanks for raising the issue @dromerosalem
Let me have a look over the next days if I can configure it in the server/app to allow it.

@Shahzaibdev355
Copy link

Shahzaibdev355 commented Jul 27, 2024

@robertoduessmann have you configured and allowed it?

@robertoduessmann
Copy link
Owner

Sadly i didnt find a way to fix this yet @shahzaibfullStackdev355

I host the app at Heroku and I couldn't find an out-of-the-box solution to enable it.

I was reading some posts and it might be required to be solved via code when the apis are exposed https://stackoverflow.com/questions/57727921/cors-issues-github-pages-heroku

@Shahzaibdev355
Copy link

ok, I will also try to figure it out how to fix this error

@rogueloop
Copy link

You will need a proxy for that @dromerosalem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants