-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Support rewriting status codes in error page middleware #11520
Conversation
I think i should also add the |
Hi @sevensolutions, Thanks for this contribution! At glance, reference documentation and Kubernetes CRDs update are missing. |
@rtribotte thx for reviewing this and sorry, didn't know that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @sevensolutions and thanks for your contribution!
I made a few suggestions concerning option naming and documentation.
Thank you for reviewing my PR @sdelicata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for your contribution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We want to move forward with this pull request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
What does this PR do?
This PR adds support for rewriting status codes when using the Errors Middleware as requested in #2039.
Motivation
I always configure a low-priority fallback router for unmatched requests like this, to show a custom 404 error page:
But because the
noop
-service always returns 418, i want to rewrite it to 404 again.This PR allows the following configuration:
statusRewrites
defines a mapping of status codes, so also supports multiple.Every key can also be a range like:
More
Additional Notes