Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

res.redirect not supported #286

Closed
dshuang opened this issue Jul 20, 2021 · 3 comments
Closed

res.redirect not supported #286

dshuang opened this issue Jul 20, 2021 · 3 comments
Labels

Comments

@dshuang
Copy link

dshuang commented Jul 20, 2021

Thanks for your work on this project.

res.redirect isn't supported, but origRes.redirect is.
What's the preferred way to handle redirects?
Thanks.

@dshuang
Copy link
Author

dshuang commented Jul 20, 2021

One solution: res.writeHead(302, {'Location':<redirect URL>)}

@kfichthorn
Copy link

kfichthorn commented Jul 20, 2021

I have the same issue....origRes.redirect works somewhat...except that
Express passes the request along to our next middleware (which handles unmatched routes) because it thinks exegesis-middleware did not handle it.
How do we prevent that? I tried calling res.end() or res.status(200) after the call to origRes.redirect. But it seems that calling origRes.redirect somehow causes the request to be passed along to our unmatched route middleware function (immediately below the exegesis middlewar) no matter what I do.

@jwalton jwalton closed this as completed in eca5e4f Dec 3, 2021
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

🎉 This issue has been resolved in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants