-
Notifications
You must be signed in to change notification settings - Fork 343
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
Docker Container 400 bad request error #81
Comments
TBH, I don’t remember setting up any docker stuff. I remember tinkering
with docker like 4 years ago, but my familiarity with docker probably
rounds to 0. I should probably just remove anything referencing docker in
the code.
…On Wed, May 6, 2020 at 6:11 PM Nick Seeber ***@***.***> wrote:
Hey, when spinning up the docker container you have in the code I always
get a 400 Bad Request error when making an API request that is in the
documentation. Any idea on what might be going on there?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#81>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMQLHT3BVXQF2VGSCJYKNLRQH4EVANCNFSM4M24D5VA>
.
|
Gotcha, thanks for the update! I Appreciate it! |
Hello There is nothing wrong with the dockerfile. I'ts just the CORS policy thats blocking your requests. You need to edit spades/settings.py file and insert your host to ALLOWED_HOSTS Best regards |
I know this is super old, but I dug into this a little bit today. I couldn't find an error with CORS, but I was able to find a CSRF error when trying to do post requests. I removed the CSRF validation, and now you should be able to make cross site requests. Let me know if that's not he case. |
Thank you :) I cant say if thats the same issue that the thread starter was experiencing. But normally docker acts the same for all parties. I would assume that you could reproduce the error by just spinning up a docker container on another host and then try to access it. I was wrong to say its the cors policy. Seems like django now requires the hosting domain to be in the list. https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-ALLOWED_HOSTS Best regards |
Hey, when spinning up the docker container you have in the code I always get a 400 Bad Request error when making an API request that is in the documentation. Any idea on what might be going on there?
The text was updated successfully, but these errors were encountered: