-
Notifications
You must be signed in to change notification settings - Fork 17
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
How to redirect to another route onDecodeError #124
Comments
Got that sorted out if (/^.*(%2)$/.test(req.url)) {
res.setHeader('Location', encodeURI(req.url.slice(0, -2)))
res.statusCode = 302
res.end()
} else {
next(error)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having an issue where I'm getting a lot of URI Malformed errors on Sentry from routes that are valid but has
%2
at the end of it. So I need a way to remove the%2
whenever there is an error while decoding and redirect the user to that route.How can I redirect the user to a different route onDecodeError?
The text was updated successfully, but these errors were encountered: