-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix endpoint response with immutable header #9876
Fix endpoint response with immutable header #9876
Conversation
🦋 Changeset detectedLatest commit: 20106a5 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Looks great to me! The tests are a welcome addition, thanks.
I will merge soon as the tests pass.
Changes
Updated the implementation of
renderEndpoint
to only append the reroute header if the response has the HTTP status code 404 or 500.This should resolve the issue mentioned in #9871.
Testing
Added tests based on the work of @lilnasy (cad43ea5c11e58b022df82907cd110e56dd4efed).
These tests check that the response returned from an endpoint contains the expected headers and doesn't error with an HTTP 500 error.
Docs
I don't think there is a need to update the documentation because of this change, since it's only internal response rewriting.