-
-
Notifications
You must be signed in to change notification settings - Fork 89
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 working only in get method APIs #14
Comments
you can disable the cors policy if you want to use a different port for the
api in you dev environment:
https://www.google.com/search?q=google+chrome+disable+cors+policy&oq=google+chrome+disable&aqs=chrome.2.69i57j0l7.9322j1j4&sourceid=chrome&ie=UTF-8
Matthieu Garrigues
…On Thu, May 14, 2020 at 11:38 AM aditya ***@***.***> wrote:
CORS working only in get method APIs.
Even if i do: Access-Control-Allow-Origin in post requests, I still get
CORS error.
Example:
Access to XMLHttpRequest at 'http://localhost:8000/api/edit/post' from
origin 'http://localhost:4200' has been blocked by CORS policy: Response
to preflight request doesn't pass access control check: No
'Access-Control-Allow-Origin' header is present on the requested resource.
Thanks,
adibro500
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#14>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGOV6BC3UNJECPE3EKHNQLRRO3YZANCNFSM4NAQWYCA>
.
|
How to make it production ready then ? |
You have 2 choices: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CORS working only in get method APIs.
Even if i do:
Access-Control-Allow-Origin
in post requests, I still get CORS error.Example:
Access to XMLHttpRequest at 'http://localhost:8000/api/edit/post' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Thanks,
adibro500
The text was updated successfully, but these errors were encountered: