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:
@@ -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