Django APi 502 Bad Gateway and CORS
i am getting CORS Error also i setup my cors correctly and plus
net::ERR_FAILED 502 (Bad Gateway) .
when i make updates and push my github is just restarts deploying but effects do not take for example my cors setup i tried modify many times also checked in chatgpt4 and chatgpt said the setup is correct but after i deploy it does not apply effects please help my project is urgent
Solution:Jump to solution
Ok well, it is working for me. I mean, I did manage to hit a 500 error. But that is likely becuase I am giving it garbage data. Either way, it isn't 502.
13 Replies
Project ID:
8c197fe1-befc-416b-84d1-21d66e2016ed
8c197fe1-befc-416b-84d1-21d66e2016ed
please send your railway generated domain
exam.up.railway.app
Works for me. Everything loads. I did a POST request and it also went through no issue. (I mean, it returned a 400 error becuase invalid login)
Also, please note that "chatgpt said the setup is correct" means nothing. It doesn't actually know.
i mean what i was asking is something i expected it to know which is public , but the error happens in specific routes like generation route but more than that it also happens 502 gateway error , just to check it i can give you login user to test
Sure, you can give me a user login and route that is breaking
[...] something i expected it to know which is publicYes, doesn't matter. It still doesn't know. And with django, there are 5 major versions. All very different from one another. It is trained on all of them. And it does not know one from the other. So ,,,, yea, no. You can not blindly assume something based on what it says. But this feels like a different conversation ...
please check the routes and give me feedback
i sent you user login
Solution
Ok well, it is working for me. I mean, I did manage to hit a 500 error. But that is likely becuase I am giving it garbage data. Either way, it isn't 502.
The
Exam Marks
route works just fine.
Other minor notes; I see a lot of auth calls. They are cheap, so it is fine. Just wonder if you could reduce that. And also, you don't have any frontend validation. Not strictly required. But is always nice (things like min and max numbers and numbers only)ok the generation and marks did work for you ?
The generation didn't generate anything. But the actual server worked just fine. And the marks worked just fine.
Is it still not working on your end?
thanks its worked