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 headers issue #9

Open
Firsak opened this issue Feb 1, 2021 · 4 comments
Open

CORS headers issue #9

Firsak opened this issue Feb 1, 2021 · 4 comments

Comments

@Firsak
Copy link

Firsak commented Feb 1, 2021

Hello!

I was working through the project and everything worked just fine, but at the step of adding dev rest api authentication CORS header broke.
Access to XMLHttpRequest at 'http://localhost:8000/api/tweets/' from origin 'http://127.0.0.1:3000' has been blocked by CORS policy: Request header field http_x_requested_with is not allowed by Access-Control-Allow-Headers in preflight response.
It doesn't work both with the localhost and 127.0.0.1
I even dowloaded the full application of this step and it didn't work either.

@Firsak
Copy link
Author

Firsak commented Feb 1, 2021

Hmmmmm, it's really strange, but I don't receive it in a new window...
Screenshot 2021-02-01 at 22 06 38

@rd9911
Copy link

rd9911 commented Feb 9, 2021

Did you do all configurations in settings.py?

@Firsak
Copy link
Author

Firsak commented Feb 12, 2021

Did you do all configurations in settings.py?

Yes, I do. Because it was working till I added the dev authentication.
And to be sure, I downloaded the version of the project from tweetme2 master branch.

As I understood it's some bug with the browsers, because I was suddenly receiving this error twice in the projects, that were already working.

@SnowLLL
Copy link

SnowLLL commented Apr 21, 2021

Did you try http://localhost:8000/?

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

3 participants