Redirect status code causing no redirect to occur #4478
-
Hey, I was looking at the fastify-session authentication example when I noticed this. However, when I try to include a status code with the reply things seem to break as the redirect no longer happens. Can anyone let me know if this is a known issue or perhaps I'm not doing something right with
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey! Can we know which For a redirect for being successful, it should fall in the range of > |
Beta Was this translation helpful? Give feedback.
Hey! Can we know which
HTTP Status
code you were using?It is important to respect the
HTTP 3xx
redirect semantics as that will indicate to the browser how to handle the redirect and what to do next. If you're trying to execute aredirect
by replying with a, e.g.213
, as it falls into the range >=200
<300
for instance the browser will understand it is ok and nothing else has to be done, as the server indicated so.For a redirect for being successful, it should fall in the range of >
300
depending on your feature need.