Use HTTPS for external links wherever possible
See gh-16319
This commit is contained in:
committed by
Andy Wilkinson
parent
e2de2c8238
commit
1a4c6f2dac
@@ -104,7 +104,7 @@ public class LocalHostUriTemplateHandlerTests {
|
||||
MockEnvironment environment = new MockEnvironment();
|
||||
UriTemplateHandler uriTemplateHandler = mock(UriTemplateHandler.class);
|
||||
Map<String, ?> uriVariables = new HashMap<>();
|
||||
URI uri = URI.create("http://www.example.com");
|
||||
URI uri = URI.create("https://www.example.com");
|
||||
given(uriTemplateHandler.expand("https://localhost:8080/", uriVariables))
|
||||
.willReturn(uri);
|
||||
LocalHostUriTemplateHandler handler = new LocalHostUriTemplateHandler(environment,
|
||||
|
||||
@@ -95,14 +95,14 @@ public class TestRestTemplateTests {
|
||||
|
||||
@Test
|
||||
public void getRootUriRootUriSetViaRestTemplateBuilder() {
|
||||
String rootUri = "http://example.com";
|
||||
String rootUri = "https://example.com";
|
||||
RestTemplateBuilder delegate = new RestTemplateBuilder().rootUri(rootUri);
|
||||
assertThat(new TestRestTemplate(delegate).getRootUri()).isEqualTo(rootUri);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getRootUriRootUriSetViaLocalHostUriTemplateHandler() {
|
||||
String rootUri = "http://example.com";
|
||||
String rootUri = "https://example.com";
|
||||
TestRestTemplate template = new TestRestTemplate();
|
||||
LocalHostUriTemplateHandler templateHandler = mock(
|
||||
LocalHostUriTemplateHandler.class);
|
||||
|
||||
Reference in New Issue
Block a user