R
Railway5mo ago
Devmoha

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:
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.
Jump to solution
13 Replies
Percy
Percy5mo ago
Project ID: 8c197fe1-befc-416b-84d1-21d66e2016ed
Devmoha
DevmohaOP5mo ago
8c197fe1-befc-416b-84d1-21d66e2016ed
Brody
Brody5mo ago
please send your railway generated domain
Devmoha
DevmohaOP5mo ago
exam.up.railway.app
Joshie
Joshie5mo ago
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.
Devmoha
DevmohaOP5mo ago
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
Joshie
Joshie5mo ago
Sure, you can give me a user login and route that is breaking
[...] something i expected it to know which is public
Yes, 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 ...
Devmoha
DevmohaOP5mo ago
please check the routes and give me feedback i sent you user login
Solution
Joshie
Joshie5mo ago
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.
Joshie
Joshie5mo ago
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)
Devmoha
DevmohaOP5mo ago
ok the generation and marks did work for you ?
Joshie
Joshie5mo ago
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?
Devmoha
DevmohaOP5mo ago
thanks its worked
Want results from more Discord servers?
Add your server