ERR_TOO_MANY_REDIRECTS

francisc0arauj0
TRIAL

a year ago

I have no errors in the log, my code has no errors and neither do the variables

0 Replies

a year ago

Are you using cloudflare?


francisc0arauj0
TRIAL

a year ago

b51594de-0245-4106-b7d1-e8d8412a6c2d


francisc0arauj0
TRIAL

a year ago

no


coderjoshdk
TRIAL

a year ago

Or django? And doing some type of http redirect stuff for "security"


francisc0arauj0
TRIAL

a year ago

yes


francisc0arauj0
TRIAL

a year ago

django + prisma


coderjoshdk
TRIAL

a year ago

Ah yea, check if you have a line like SECURE_SSL_REDIRECT = True. If so, get rid of it


coderjoshdk
TRIAL

a year ago

And if it isn't the django app but the prisma stuff, it is likely a similar reason. At least, that is what got me once


francisc0arauj0
TRIAL

a year ago

no


francisc0arauj0
TRIAL

a year ago

I don't have anything like that


francisc0arauj0
TRIAL

a year ago

I'm also using socket


coderjoshdk
TRIAL

a year ago

Well, obligatory; does it work properly locally?


francisc0arauj0
TRIAL

a year ago

yes


francisc0arauj0
TRIAL

a year ago

0 errors

1257747808606224400


coderjoshdk
TRIAL

a year ago

Well 100% something is trying to do some level of redirect. Railway handles https for you. So if you have some redirect into https type stuff, it causes errors. So, I would start by looking for that type of logic and disabling


francisc0arauj0
TRIAL

a year ago

and the http://localhost:5756/ have ERRCONNECTIONREFUSED


francisc0arauj0
TRIAL

a year ago

hmm


francisc0arauj0
TRIAL

a year ago

I do not have anything


a year ago

next frontend with a django backend?


francisc0arauj0
TRIAL

a year ago

yes


a year ago

are you getting the redirects from the frontend or backend domain?


coderjoshdk
TRIAL

a year ago

?? Well, this isn't a real site. This is localhost. Not something for you to interact with (unless deployed locally). So what do you mean?


francisc0arauj0
TRIAL

a year ago

back-end


a year ago

send your settings.py please


francisc0arauj0
TRIAL

a year ago

no bro is not djando 🤣 sry


francisc0arauj0
TRIAL

a year ago

is mongodb


francisc0arauj0
TRIAL

a year ago

mongodb + prisma


a year ago

so you arent using django anywhere??


francisc0arauj0
TRIAL

a year ago

no no


a year ago

how do you mistakenly think you are using django?


francisc0arauj0
TRIAL

a year ago

I got confused sorry, I have a project in django but it's not this one


francisc0arauj0
TRIAL

a year ago

I don't know what it could be


a year ago

please take joshie's advice


francisc0arauj0
TRIAL

a year ago

I'll spend the day on this, I did this almost the whole day before coming here


a year ago

something in your code is sending a redirect


a year ago

try having it trust the proxy headers


francisc0arauj0
TRIAL

a year ago

like api?


francisc0arauj0
TRIAL

a year ago

I think I already know what it is


coderjoshdk
TRIAL

a year ago

NextJS does have middleware builtin. It is likely doing something for you that is causing the redirects. It is mostly DX streamlined for Vercel. But it can be used on other platforms. Just not the typical happy path


francisc0arauj0
TRIAL

a year ago

I'm not using theirs middleware


francisc0arauj0
TRIAL

a year ago

I found the problem


a year ago

do tell


francisc0arauj0
TRIAL

a year ago

If the error is there, I'm using a function that is deprecated


francisc0arauj0
TRIAL

a year ago

I'm using clerk middleware


a year ago

joshie was right then, it was middleware doing something undesirable, in the future please don't be so dismissive when community members try to help you


francisc0arauj0
TRIAL

a year ago

Sorry bro, I've been trying to resolve this for hours


ERR_TOO_MANY_REDIRECTS - Railway Help Station