ERR_TOO_MANY_REDIRECTS

francisc0arauj0TRIAL

10 months ago

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

0 Replies

10 months ago

Are you using cloudflare?


francisc0arauj0TRIAL

10 months ago

b51594de-0245-4106-b7d1-e8d8412a6c2d


francisc0arauj0TRIAL

10 months ago

no


coderjoshdkTRIAL

10 months ago

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


francisc0arauj0TRIAL

10 months ago

yes


francisc0arauj0TRIAL

10 months ago

django + prisma


coderjoshdkTRIAL

10 months ago

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


coderjoshdkTRIAL

10 months 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


francisc0arauj0TRIAL

10 months ago

no


francisc0arauj0TRIAL

10 months ago

I don't have anything like that


francisc0arauj0TRIAL

10 months ago

I'm also using socket


coderjoshdkTRIAL

10 months ago

Well, obligatory; does it work properly locally?


francisc0arauj0TRIAL

10 months ago

yes


francisc0arauj0TRIAL

10 months ago

0 errors

1257747808606224400


coderjoshdkTRIAL

10 months 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


francisc0arauj0TRIAL

10 months ago

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


francisc0arauj0TRIAL

10 months ago

hmm


francisc0arauj0TRIAL

10 months ago

I do not have anything


10 months ago

next frontend with a django backend?


francisc0arauj0TRIAL

10 months ago

yes


10 months ago

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


coderjoshdkTRIAL

10 months 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?


francisc0arauj0TRIAL

10 months ago

back-end


10 months ago

send your settings.py please


francisc0arauj0TRIAL

10 months ago

no bro is not djando 🤣 sry


francisc0arauj0TRIAL

10 months ago

is mongodb


francisc0arauj0TRIAL

10 months ago

mongodb + prisma


10 months ago

so you arent using django anywhere??


francisc0arauj0TRIAL

10 months ago

no no


10 months ago

how do you mistakenly think you are using django?


francisc0arauj0TRIAL

10 months ago

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


francisc0arauj0TRIAL

10 months ago

I don't know what it could be


10 months ago

please take joshie's advice


francisc0arauj0TRIAL

10 months ago

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


10 months ago

something in your code is sending a redirect


10 months ago

try having it trust the proxy headers


francisc0arauj0TRIAL

10 months ago

like api?


francisc0arauj0TRIAL

10 months ago

I think I already know what it is


coderjoshdkTRIAL

10 months 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


francisc0arauj0TRIAL

10 months ago

I'm not using theirs middleware


francisc0arauj0TRIAL

10 months ago

I found the problem


10 months ago

do tell


francisc0arauj0TRIAL

10 months ago

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


francisc0arauj0TRIAL

10 months ago

I'm using clerk middleware


10 months 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


francisc0arauj0TRIAL

10 months ago

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