Adds support in UriComponentsBuilder to handle X-Forwarded-Prefix header used by reverse proxies to specify the segment of the URL path that has been stripped by that reverse proxy. It is especially useful in conjunction with the X-Forwarded-Host header for building location-dependent content such as HATEOAS links, where the generated links should direct the client to further resources via the proxy rather than the target server.
The ForwardedHeaderTransformer does not need to handle the X-Forwarded-Prefix header as a special case as it is now handled by the UrlComponentsBuilder.
Closes #24723
Comment From: pivotal-issuemaster
@stuartwakefield Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@stuartwakefield Thank you for signing the Contributor License Agreement!
Comment From: rstoyanchev
Closing this for now to keep the discussion in one place under #24723. Generally, you don't need to submit both an issue and a PR. We keep only one open.