Add support for error pages for VS/VSR #847
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR introduces the error_page directive to use with VS/VSR for circuit breaking.
Changes
This PR introduces changes in how the NGINX configuration is generated using the templates. Prior to this PR, the internal redirections were done by using the
error_page
directive. However, this would prevent the usage of error_pages by the user, this has been changed to use therewrite
directive:instead of
This change affects to the locations used for internal redirect. Before, they were named locations. But because
rewrite
directive won't work with named locations, regular locations need to be used. However, to prevent these locations to be accessible, the internal directive has been added.Additionally, in order to avoid conflicts with locations defined by the user, a prefix
internal_location_
will be used for these locations. This will make the locations look like this:Instead of:
Checklist
Before creating a PR, run through this checklist and mark each as complete.