Answer the question
In order to leave comments, you need to log in
How to fix Response for preflight is invalid (redirect)?
I get user data through rest
in the console
Failed to load http://127.0.0.1:8000/api/user/username: Response for preflight is invalid (redirect)
CORS_ORIGIN_ALLOW_ALL = True
CORS_ORIGIN_WHITELIST = (
'localhost:3000',
)
Answer the question
In order to leave comments, you need to log in
Looks like a problem with cors. Either dig django settings, or install some kind of browser extension https://chrome.google.com/webstore/detail/allow-co...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question