Make it possible to place url rewriting before apicast in the policy chain #531
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.
This PR introduces some changes in the code to stop depending on
ngx.var.request
. That variable is not changed after rewriting a url withngx.req.set_uri
, which is what the URL rewriting policy does. This was preventing us from placing the URL rewriting policy before the apicast one in the policy chain.This was done without breaking compatibility with users that overwrite
Configuration.extract_usage()
and rely on it being called.This limitation was presented in #529