From 26b2380124226401e7c7f071a1b74b99a0234892 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Wed, 20 Mar 2019 15:39:57 -0500 Subject: [PATCH] URL Cleanup This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * [ ] http://foo/bar (UnknownHostException) with 1 occurrences migrated to: https://foo/bar ([https](https://foo/bar) result UnknownHostException). * [ ] http://nosuchservice (UnknownHostException) with 1 occurrences migrated to: https://nosuchservice ([https](https://nosuchservice) result UnknownHostException). * [ ] http://simple/ (UnknownHostException) with 1 occurrences migrated to: https://simple/ ([https](https://simple/) result UnknownHostException). * [ ] http://user (UnknownHostException) with 2 occurrences migrated to: https://user ([https](https://user) result UnknownHostException). * [ ] http://user::password@localhost:8761/eureka/ (UnknownHostException) with 1 occurrences migrated to: https://user::password@localhost:8761/eureka/ ([https](https://user::password@localhost:8761/eureka/) result UnknownHostException). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://cloud.spring.io/spring-cloud-static/spring-cloud.html with 1 occurrences migrated to: https://cloud.spring.io/spring-cloud-static/spring-cloud.html ([https](https://cloud.spring.io/spring-cloud-static/spring-cloud.html) result 200). * [ ] http://example.com with 1 occurrences migrated to: https://example.com ([https](https://example.com) result 200). # Ignored These URLs were intentionally ignored. * http://localhost with 17 occurrences * http://localhost:7777 with 1 occurrences * http://localhost:8000/src/main/resources/health.json with 1 occurrences * http://localhost:8080 with 1 occurrences * http://localhost:8080/hystrix.stream with 1 occurrences * http://localhost:8888 with 1 occurrences --- .../src/main/java/demo/ExampleClient.java | 2 +- feign-eureka/src/main/resources/application.yml | 2 +- hystrix/README.md | 2 +- netflix-sidecar/src/main/resources/application.yml | 2 +- .../src/test/java/demo/RibbonClientApplicationTests.java | 4 ++-- ribbon-eureka/src/main/java/demo/HelloClientApplication.java | 2 +- zuul-config-discovery/src/main/resources/bootstrap.yml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/feign-eager-instantiation/src/main/java/demo/ExampleClient.java b/feign-eager-instantiation/src/main/java/demo/ExampleClient.java index 71819bf..5ee392c 100644 --- a/feign-eager-instantiation/src/main/java/demo/ExampleClient.java +++ b/feign-eager-instantiation/src/main/java/demo/ExampleClient.java @@ -4,7 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -@FeignClient(name = "example", url = "http://example.com") +@FeignClient(name = "example", url = "https://example.com") public interface ExampleClient { @RequestMapping(value = "/", method = RequestMethod.GET) diff --git a/feign-eureka/src/main/resources/application.yml b/feign-eureka/src/main/resources/application.yml index 69a997b..1c83c18 100644 --- a/feign-eureka/src/main/resources/application.yml +++ b/feign-eureka/src/main/resources/application.yml @@ -13,7 +13,7 @@ eureka: password: password client: serviceUrl: - defaultZone: http://user:${eureka.password}@localhost:8761/eureka/ + defaultZone: https://user:${eureka.password}@localhost:8761/eureka/ instance: leaseRenewalIntervalInSeconds: 10 metadataMap: diff --git a/hystrix/README.md b/hystrix/README.md index d706fda..ce54964 100644 --- a/hystrix/README.md +++ b/hystrix/README.md @@ -1,6 +1,6 @@ # About This project is a sample of using just the Hystrix Starter. For more information see the -[Hystrix documentation](http://cloud.spring.io/spring-cloud-static/spring-cloud.html#_circuit_breaker_hystrix_clients). +[Hystrix documentation](https://cloud.spring.io/spring-cloud-static/spring-cloud.html#_circuit_breaker_hystrix_clients). # Usage This simple app contains two endpoints both surrounded by Hystrix circuit breakers. diff --git a/netflix-sidecar/src/main/resources/application.yml b/netflix-sidecar/src/main/resources/application.yml index ffa6d4c..8988c97 100644 --- a/netflix-sidecar/src/main/resources/application.yml +++ b/netflix-sidecar/src/main/resources/application.yml @@ -12,7 +12,7 @@ eureka: password: password client: serviceUrl: - defaultZone: http://user:${eureka.password}@localhost:8761/eureka/ + defaultZone: https://user:${eureka.password}@localhost:8761/eureka/ instance: leaseRenewalIntervalInSeconds: 10 metadataMap: diff --git a/oauth2-ribbon/src/test/java/demo/RibbonClientApplicationTests.java b/oauth2-ribbon/src/test/java/demo/RibbonClientApplicationTests.java index c1102ac..073ee2c 100644 --- a/oauth2-ribbon/src/test/java/demo/RibbonClientApplicationTests.java +++ b/oauth2-ribbon/src/test/java/demo/RibbonClientApplicationTests.java @@ -45,7 +45,7 @@ public class RibbonClientApplicationTests { public void oauth2RestTemplateHasLoadBalancer() throws Exception { /* // Just to prove that the interceptor is present... ClientHttpRequest request = oauth2RestTemplate.getRequestFactory() - .createRequest(new URI("http://nosuchservice"), HttpMethod.GET); + .createRequest(new URI("https://nosuchservice"), HttpMethod.GET); expected.expectMessage("No instances available for nosuchservice"); request.execute();*/ } @@ -56,7 +56,7 @@ public class RibbonClientApplicationTests { this.expected.expect(UserRedirectRequiredException.class); RequestContextHolder .setRequestAttributes(new ServletRequestAttributes(this.request)); - this.oauth2RestTemplate.getForEntity("http://foo/bar", String.class); + this.oauth2RestTemplate.getForEntity("https://foo/bar", String.class); }*/ } diff --git a/ribbon-eureka/src/main/java/demo/HelloClientApplication.java b/ribbon-eureka/src/main/java/demo/HelloClientApplication.java index ca62523..a85dd4f 100644 --- a/ribbon-eureka/src/main/java/demo/HelloClientApplication.java +++ b/ribbon-eureka/src/main/java/demo/HelloClientApplication.java @@ -23,7 +23,7 @@ public class HelloClientApplication { @RequestMapping("/") public String hello() { - return this.client.getForObject("http://simple/", String.class); + return this.client.getForObject("https://simple/", String.class); } public static void main(String[] args) { diff --git a/zuul-config-discovery/src/main/resources/bootstrap.yml b/zuul-config-discovery/src/main/resources/bootstrap.yml index 43e2d41..11e3fd2 100755 --- a/zuul-config-discovery/src/main/resources/bootstrap.yml +++ b/zuul-config-discovery/src/main/resources/bootstrap.yml @@ -12,4 +12,4 @@ spring: eureka: client: serviceUrl: - defaultZone: http://user::password@localhost:8761/eureka/ + defaultZone: https://user::password@localhost:8761/eureka/