-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve response headers when redirecting application error to gatew…
…ay error pages Commit 37ff94b make the `ApplicationError` Gateway filter lose the original response headers when throwing a `ResponseStatusException` for the Gateway to show up the customized HTML error pages instead of the orignal (usually whitelabel) errors. This patch makes it so that the `ApplicationError` filter runs only when `text/html` is accepted by the request, and the request method is idempotent (e.g. GET, HEAD, etc.). Additionally, the original response headers are not lost, since the exception is thrown at `ServerHttpResponseDecorator.beforeCommit()`, and respecting the reactive chain.
- Loading branch information
Showing
3 changed files
with
263 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.