mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Add fromHttpRequest to UriComponentsBuilder
Before this change, detection of X-Forwarded-* headers was only built into ServletUriComponentsBuilder. This change adds a new method for creating a UriComponentsBuilder from an existing HttpRequest. This is equivalent to the fromUri method + X-Forwarded-* header values.
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ public class ServletUriComponentsBuilderTests {
|
||||
this.request = new MockHttpServletRequest();
|
||||
this.request.setScheme("http");
|
||||
this.request.setServerName("localhost");
|
||||
this.request.setServerPort(80);
|
||||
this.request.setServerPort(-1);
|
||||
this.request.setContextPath("/mvc-showcase");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user