Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

CORS accept Post Requests from other domain #38

Open
vitormorales opened this issue Mar 21, 2017 · 1 comment
Open

CORS accept Post Requests from other domain #38

vitormorales opened this issue Mar 21, 2017 · 1 comment

Comments

@vitormorales
Copy link

I have a API with django-rest-framework and django-cors-headers configured in stage env

CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = (
'myotherdmain.com',
)
CSRF_TRUSTED_ORIGINS = (
'myotherdomain.com',
)

When I do GET requests from my localhost to the published API is blocked and ok. But if I try POST requests I don't recieve any error message and the request is allowed. What am I doing wrong ? What I get is: with CORS, API will not allowed to recieve any request from other domain wich isn't in CORS_ORIGIN_WHITELIST.

Ideas?
Django version: 1.10.5

Thanks !

@ashdaily
Copy link

I am facing the same problem.

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

No branches or pull requests

2 participants