NS_ERROR_REDIRECT_LOOP
I am running a Django server using a docker file.
Project id a9861a99-1c51-4b34-8970-6e92d5cd7f47
The deploy log states that the gunicorn started succesfully, but I get an infinite redirect cycle when I try to access the website? Any suggestions how to avoid this? I don't have this problem on localhost.
So I am getting 301's to the same url looped.
4 Replies
Project ID:
a9861a99-1c51-4b34-8970-6e92d5cd7f47
are you using cloudflare proxy?
No
Hmm it appears to be a consequence of
SECURE_HSTS_PRELOAD=True
your app runs in http mode and sits behind railway's https proxy, but your app isn't aware of that https proxy so it will always keep trying to redirect to https thus resulting in the infinite redirect. you can disable all http -> https redirects on your apps side of things because railway will not allow external access from anything but https anyways.