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.
Fix Path Rewrite Issue with curl -x Proxy AND nginx check
Description
When using curl -x to send requests through a proxy, the path-rewrite functionality does not work as expected. This issue arises because the proxy server does not correctly handle the path rewriting rules specified in the request.
Motivation and Context
When sending a request through a proxy using curl -x, the path-rewrite rules defined in the request are not applied. This results in the request being sent to the target server with the original path, rather than the rewritten path.
How has this been tested?
configuration like this
then start the node with 80 port
curl -x http://127.0.0.1:80 http://test.domain.com/hs
In this example, the request should be rewritten to http://127.0.0.1:9000/hs, but instead, it is sent as http://127.0.0.1:9000/hs/hs.
solution
before path-rewrite, parse the full url, get the real path inestead of the url
Types of changes
Checklist: