Glitch server does not work: redirect too many times, or stuck on the "Starting " page

Glitch server does not work:
For example it get “redirect too many times” although I have deleted all my cookies for this site:
https://dbsc-prototype-server.glitch.me/

And got shuck on “starting” page for this site: https://dbsc-prototype-server-donna.glitch.me/

That might mean there is an error in the code! Try going into the console in the editor and seeing if there are any errors that pop up there.

I can’t find any error there, it looks like:

And I have tested it locally and it works.

are you using an https redirect middleware?

Glitch only exposes port 3000, not port 37153.

1 Like

Ooh Good catch! So @wdxg, as @Pufferfish101007 said, you have to change your port from 3000 to 37153!

huh I wonder what’s doing all those redirects then

Thanks, it works now. I have set host and port env.

dbsc-prototype-server would redirect with a Set-Cookie header if the specific cookie is not present. It seems the glitch preview pane cannot handle this and stuck into infinite redirection.

redirect to where though, itself? :face_with_raised_eyebrow:

I think the preview pane doesn’t support cookies (I think that could be solved just by changing the sandbox attribute of the iframe). I’m not sure about local storage though

Yes…

Indeed. Also not sure whether the cookie will be treated as third party cookie after changing the sandbox attribute.

then what actually sets the cookie?