If a server is behind a reverse proxy, for example, the application correct URL is "https://www.exmaple.com/t1/app-context/", but the {baseUrl} returns as "https://www.exmaple.com/app-context/", the "/t1" that represents a server behind the reverse proxy is missing

Comment From: jzheaux

Thank you, @zhanedw-statcan for the report and the PR.

I'm not sure I'm following just yet. When behind a reverse proxy, it is usually necessary to check the X-Forwarded-xxx headers, which I believe is addressed when publishing ForwardedHeaderFilter as a bean.

How does your application behave when using ForwardedHeaderFilter?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: zhanedw-statcan

Thank you, @zhanedw-statcan for the report and the PR.

I'm not sure I'm following just yet. When behind a reverse proxy, it is usually necessary to check the X-Forwarded-xxx headers, which I believe is addressed when publishing ForwardedHeaderFilter as a bean.

How does your application behave when using ForwardedHeaderFilter?

'X-Forwarded-xxx' is used for storing the IP address of the client, such as browser. As the server only knows the reverse proxy's IP address, if the server wants to know the real client's IP address, it uses 'X-Forwarded-xxx' headers.

The issue here is about the server's own URL. For example, the server behind the proxy server should be "https://www.exmaple.com/t1", which includes "t1". But the code removes "t1", consequently the {baseURL} is returned with "https://www.exmaple.com/", which is not correct.