Skip to content

fix: proxy-rewrite should set ngx.var.uri#9309

Merged
juststillthinking merged 1 commit into
apache:masterfrom
kingluo:proxy-rewrite-set-uri
Apr 20, 2023
Merged

fix: proxy-rewrite should set ngx.var.uri#9309
juststillthinking merged 1 commit into
apache:masterfrom
kingluo:proxy-rewrite-set-uri

Conversation

@kingluo

@kingluo kingluo commented Apr 14, 2023

Copy link
Copy Markdown
Contributor

Description

Besides custom upstream_uri var, it should set ngx.var.uri to keep compatible.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@kingluo
kingluo force-pushed the proxy-rewrite-set-uri branch from 37a4b94 to 4f4d0dd Compare April 14, 2023 06:45
upstream_uri = core.utils.uri_safe_encode(upstream_uri)
end

req_set_uri(upstream_uri)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we don't need to set uri when use_real_request_uri_unsafe is true, because in that case, the upstream_uri is supposed to take precedence.

@kingluo
kingluo marked this pull request as ready for review April 14, 2023 07:45
@juststillthinking
juststillthinking merged commit 5415916 into apache:master Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants