From b95c84f092afe9a34c901e54c7f9b4d6c724115d Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Tue, 26 Mar 2019 00:10:17 -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). # HTTP URLs that Could Not Be Fixed These URLs were unable to be fixed. Please review them to see if they can be manually resolved. * [ ] http://httpbin.org:80 (200) with 9 occurrences could not be migrated: ([https](https://httpbin.org:80) result NotSslRecordException). # 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://acme.org (ConnectTimeoutException) with 6 occurrences migrated to: https://acme.org ([https](https://acme.org) result ConnectTimeoutException). * [ ] http://www.uri-destination.org (UnknownHostException) with 2 occurrences migrated to: https://www.uri-destination.org ([https](https://www.uri-destination.org) result UnknownHostException). * [ ] http://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/GatewayFilter.html (301) with 3 occurrences migrated to: https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/GatewayFilter.html ([https](https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/GatewayFilter.html) result 404). ## 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-netflix/ with 2 occurrences migrated to: https://cloud.spring.io/spring-cloud-netflix/ ([https](https://cloud.spring.io/spring-cloud-netflix/) result 200). * [ ] http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html with 3 occurrences migrated to: https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html ([https](https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html) result 200). * [ ] http://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/ServerWebExchange.html with 3 occurrences migrated to: https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/ServerWebExchange.html ([https](https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/ServerWebExchange.html) result 200). * [ ] http://example.org with 90 occurrences migrated to: https://example.org ([https](https://example.org) result 200). * [ ] http://projects.spring.io/spring-cloud/ with 4 occurrences migrated to: https://projects.spring.io/spring-cloud/ ([https](https://projects.spring.io/spring-cloud/) result 200). * [ ] http://projects.spring.io/spring-security/ with 2 occurrences migrated to: https://projects.spring.io/spring-security/ ([https](https://projects.spring.io/spring-security/) result 200). * [ ] http://projects.spring.io/spring-session/ with 2 occurrences migrated to: https://projects.spring.io/spring-session/ ([https](https://projects.spring.io/spring-session/) result 200). * [ ] http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd with 1 occurrences migrated to: https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd ([https](https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd) result 200). * [ ] http://docs.spring.io with 2 occurrences migrated to: https://docs.spring.io ([https](https://docs.spring.io) result 301). # Ignored These URLs were intentionally ignored. * http://docbook.org/ns/docbook with 4 occurrences * http://localhost:3001 with 2 occurrences * http://localhost:8080/flakey with 2 occurrences * http://localhost:8080/upload with 2 occurrences * http://localhost:9994 with 8 occurrences * http://nameservice with 2 occurrences * http://nameservice/foo with 4 occurrences * http://www.w3.org/1999/xlink with 4 occurrences * http://www.w3.org/2000/svg with 1 occurrences --- 1.0.x/spring-cloud-gateway.xml | 2 +- 2.0.x/spring-cloud-gateway.xml | 64 ++++++++--------- 2.1.x/spring-cloud-gateway.xml | 84 +++++++++++------------ font-awesome/font/fontawesome-webfont.svg | 2 +- spring-cloud-gateway.xml | 82 +++++++++++----------- 5 files changed, 117 insertions(+), 117 deletions(-) diff --git a/1.0.x/spring-cloud-gateway.xml b/1.0.x/spring-cloud-gateway.xml index ed420352..73138504 100644 --- a/1.0.x/spring-cloud-gateway.xml +++ b/1.0.x/spring-cloud-gateway.xml @@ -13,7 +13,7 @@ How to Include Spring Cloud Gateway -To include Spring Cloud Gateway in your project add a dependency with group org.springframework.cloud and artifact id spring-cloud-gateway-mvc. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train. +To include Spring Cloud Gateway in your project add a dependency with group org.springframework.cloud and artifact id spring-cloud-gateway-mvc. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train. Building a Gateway Using Spring MVC diff --git a/2.0.x/spring-cloud-gateway.xml b/2.0.x/spring-cloud-gateway.xml index aba427f9..62f95817 100644 --- a/2.0.x/spring-cloud-gateway.xml +++ b/2.0.x/spring-cloud-gateway.xml @@ -14,7 +14,7 @@ How to Include Spring Cloud Gateway To include Spring Cloud Gateway in your project use the starter with group org.springframework.cloud -and artifact id spring-cloud-starter-gateway. See the Spring Cloud Project page +and artifact id spring-cloud-starter-gateway. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train. If you include the starter, but, for some reason, you do not want the gateway to be enabled, set spring.cloud.gateway.enabled=false. @@ -25,10 +25,10 @@ for details on setting up your build system with the current Spring Cloud Releas Route: Route the basic building block of the gateway. It is defined by an ID, a destination URI, a collection of predicates and a collection of filters. A route is matched if aggregate predicate is true. -Predicate: This is a Java 8 Function Predicate. The input type is a Spring Framework ServerWebExchange. This allows developers to match on anything from the HTTP request, such as headers or parameters. +Predicate: This is a Java 8 Function Predicate. The input type is a Spring Framework ServerWebExchange. This allows developers to match on anything from the HTTP request, such as headers or parameters. -Filter: These are instances Spring Framework GatewayFilter constructed in with a specific factory. Here, requests and responses can be modified before or after sending the downstream request. +Filter: These are instances Spring Framework GatewayFilter constructed in with a specific factory. Here, requests and responses can be modified before or after sending the downstream request. @@ -59,7 +59,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: after_route - uri: http://example.org + uri: https://example.org predicates: - After=2017-01-20T17:42:47.789-07:00[America/Denver] @@ -78,7 +78,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: before_route - uri: http://example.org + uri: https://example.org predicates: - Before=2017-01-20T17:42:47.789-07:00[America/Denver] @@ -97,7 +97,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: between_route - uri: http://example.org + uri: https://example.org predicates: - Betweeen=2017-01-20T17:42:47.789-07:00[America/Denver], 2017-01-21T17:42:47.789-07:00[America/Denver] @@ -116,7 +116,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: cookie_route - uri: http://example.org + uri: https://example.org predicates: - Cookie=chocolate, ch.p @@ -135,7 +135,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: header_route - uri: http://example.org + uri: https://example.org predicates: - Header=X-Request-Id, \d+ @@ -154,7 +154,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: host_route - uri: http://example.org + uri: https://example.org predicates: - Host=**.somehost.org @@ -173,7 +173,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: method_route - uri: http://example.org + uri: https://example.org predicates: - Method=GET @@ -192,7 +192,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: host_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/{segment} @@ -212,7 +212,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: query_route - uri: http://example.org + uri: https://example.org predicates: - Query=baz @@ -227,7 +227,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: query_route - uri: http://example.org + uri: https://example.org predicates: - Query=foo, ba. @@ -246,7 +246,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: remoteaddr_route - uri: http://example.org + uri: https://example.org predicates: - RemoteAddr=192.168.1.1/24 @@ -269,7 +269,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: add_request_header_route - uri: http://example.org + uri: https://example.org filters: - AddRequestHeader=X-Request-Foo, Bar @@ -288,7 +288,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: add_request_parameter_route - uri: http://example.org + uri: https://example.org filters: - AddRequestParameter=foo, bar @@ -307,7 +307,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: add_request_header_route - uri: http://example.org + uri: https://example.org filters: - AddResponseHeader=X-Response-Foo, Bar @@ -326,7 +326,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: hytstrix_route - uri: http://example.org + uri: https://example.org filters: - Hystrix=myCommandName @@ -345,7 +345,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: prefixpath_route - uri: http://example.org + uri: https://example.org filters: - PrefixPath=/mypath @@ -377,7 +377,7 @@ for details on setting up your build system with the current Spring Cloud Releas routes: # ===================================== - id: requestratelimiter_route - uri: http://example.org + uri: https://example.org filters: - RequestRateLimiter=10, 20, #{@userKeyResolver} @@ -405,12 +405,12 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: prefixpath_route - uri: http://example.org + uri: https://example.org filters: - - RedirectTo=302, http://acme.org + - RedirectTo=302, https://acme.org -This will send a status 302 with a Location:http://acme.org header to perform a redirect. +This will send a status 302 with a Location:https://acme.org header to perform a redirect.
RemoveNonProxyHeaders GatewayFilter Factory @@ -456,7 +456,7 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: removerequestheader_route - uri: http://example.org + uri: https://example.org filters: - RemoveRequestHeader=X-Request-Foo @@ -475,7 +475,7 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: removeresponseheader_route - uri: http://example.org + uri: https://example.org filters: - RemoveResponseHeader=X-Response-Foo @@ -494,7 +494,7 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: rewritepath_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/** filters: @@ -574,7 +574,7 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: setpath_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/{segment} filters: @@ -595,7 +595,7 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: setresponseheader_route - uri: http://example.org + uri: https://example.org filters: - SetResponseHeader=X-Response-Foo, Bar @@ -614,11 +614,11 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: setstatusstring_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=BAD_REQUEST - id: setstatusint_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=401 @@ -680,13 +680,13 @@ KeyResolver userKeyResolver() { routes: # ===================================== - id: setstatus_route - uri: http://example.org + uri: https://example.org filters: - name: SetStatus args: status: 401 - id: setstatusshortcut_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=401 diff --git a/2.1.x/spring-cloud-gateway.xml b/2.1.x/spring-cloud-gateway.xml index ed7c5229..2cb933c7 100644 --- a/2.1.x/spring-cloud-gateway.xml +++ b/2.1.x/spring-cloud-gateway.xml @@ -14,7 +14,7 @@ How to Include Spring Cloud Gateway To include Spring Cloud Gateway in your project use the starter with group org.springframework.cloud -and artifact id spring-cloud-starter-gateway. See the Spring Cloud Project page +and artifact id spring-cloud-starter-gateway. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train. If you include the starter, but, for some reason, you do not want the gateway to be enabled, set spring.cloud.gateway.enabled=false. @@ -37,10 +37,10 @@ working with Spring Cloud Gateway. Route: Route the basic building block of the gateway. It is defined by an ID, a destination URI, a collection of predicates and a collection of filters. A route is matched if aggregate predicate is true. -Predicate: This is a Java 8 Function Predicate. The input type is a Spring Framework ServerWebExchange. This allows developers to match on anything from the HTTP request, such as headers or parameters. +Predicate: This is a Java 8 Function Predicate. The input type is a Spring Framework ServerWebExchange. This allows developers to match on anything from the HTTP request, such as headers or parameters. -Filter: These are instances Spring Framework GatewayFilter constructed in with a specific factory. Here, requests and responses can be modified before or after sending the downstream request. +Filter: These are instances Spring Framework GatewayFilter constructed in with a specific factory. Here, requests and responses can be modified before or after sending the downstream request. @@ -73,7 +73,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: after_route - uri: http://example.org + uri: https://example.org predicates: - After=2017-01-20T17:42:47.789-07:00[America/Denver] @@ -91,7 +91,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: before_route - uri: http://example.org + uri: https://example.org predicates: - Before=2017-01-20T17:42:47.789-07:00[America/Denver] @@ -109,7 +109,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: between_route - uri: http://example.org + uri: https://example.org predicates: - Between=2017-01-20T17:42:47.789-07:00[America/Denver], 2017-01-21T17:42:47.789-07:00[America/Denver] @@ -127,7 +127,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: cookie_route - uri: http://example.org + uri: https://example.org predicates: - Cookie=chocolate, ch.p @@ -145,7 +145,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: header_route - uri: http://example.org + uri: https://example.org predicates: - Header=X-Request-Id, \d+ @@ -163,7 +163,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: host_route - uri: http://example.org + uri: https://example.org predicates: - Host=**.somehost.org,**.anotherhost.org @@ -183,7 +183,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: method_route - uri: http://example.org + uri: https://example.org predicates: - Method=GET @@ -201,7 +201,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: host_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/{segment},/bar/{segment} @@ -224,7 +224,7 @@ String segment = uriVariables.get("segment"); gateway: routes: - id: query_route - uri: http://example.org + uri: https://example.org predicates: - Query=baz @@ -238,7 +238,7 @@ String segment = uriVariables.get("segment"); gateway: routes: - id: query_route - uri: http://example.org + uri: https://example.org predicates: - Query=foo, ba. @@ -256,7 +256,7 @@ String segment = uriVariables.get("segment"); gateway: routes: - id: remoteaddr_route - uri: http://example.org + uri: https://example.org predicates: - RemoteAddr=192.168.1.1/24 @@ -343,7 +343,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: add_request_header_route - uri: http://example.org + uri: https://example.org filters: - AddRequestHeader=X-Request-Foo, Bar @@ -361,7 +361,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: add_request_parameter_route - uri: http://example.org + uri: https://example.org filters: - AddRequestParameter=foo, bar @@ -379,7 +379,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: add_response_header_route - uri: http://example.org + uri: https://example.org filters: - AddResponseHeader=X-Response-Foo, Bar @@ -397,7 +397,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: dedupe_response_header_route - uri: http://example.org + uri: https://example.org filters: - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin @@ -409,7 +409,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i Hystrix GatewayFilter Factory Hystrix is a library from Netflix that implements the circuit breaker pattern. The Hystrix GatewayFilter allows you to introduce circuit breakers to your gateway routes, protecting your services from cascading failures and allowing you to provide fallback responses in the event of downstream failures. -To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix. +To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix. The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand. application.yml @@ -419,7 +419,7 @@ The Hystrix GatewayFilter allows you to introduce circuit breakers to your gatew gateway: routes: - id: hystrix_route - uri: http://example.org + uri: https://example.org filters: - Hystrix=myCommandName @@ -549,7 +549,7 @@ their default values: gateway: routes: - id: prefixpath_route - uri: http://example.org + uri: https://example.org filters: - PrefixPath=/mypath @@ -567,7 +567,7 @@ their default values: gateway: routes: - id: preserve_host_route - uri: http://example.org + uri: https://example.org filters: - PreserveHostHeader @@ -614,7 +614,7 @@ spring.cloud.gateway.routes[0].filters[0]=RequestRateLimiter=2, 2, #{@userkeyres gateway: routes: - id: requestratelimiter_route - uri: http://example.org + uri: https://example.org filters: - name: RequestRateLimiter args: @@ -641,7 +641,7 @@ KeyResolver userKeyResolver() { gateway: routes: - id: requestratelimiter_route - uri: http://example.org + uri: https://example.org filters: - name: RequestRateLimiter args: @@ -662,12 +662,12 @@ KeyResolver userKeyResolver() { gateway: routes: - id: prefixpath_route - uri: http://example.org + uri: https://example.org filters: - - RedirectTo=302, http://acme.org + - RedirectTo=302, https://acme.org -This will send a status 302 with a Location:http://acme.org header to perform a redirect. +This will send a status 302 with a Location:https://acme.org header to perform a redirect.
RemoveHopByHopHeadersFilter GatewayFilter Factory @@ -712,7 +712,7 @@ KeyResolver userKeyResolver() { gateway: routes: - id: removerequestheader_route - uri: http://example.org + uri: https://example.org filters: - RemoveRequestHeader=X-Request-Foo @@ -730,7 +730,7 @@ KeyResolver userKeyResolver() { gateway: routes: - id: removeresponseheader_route - uri: http://example.org + uri: https://example.org filters: - RemoveResponseHeader=X-Response-Foo @@ -751,7 +751,7 @@ and have it applied to all routes. gateway: routes: - id: rewritepath_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/** filters: @@ -771,7 +771,7 @@ and have it applied to all routes. gateway: routes: - id: rewriteresponseheader_route - uri: http://example.org + uri: https://example.org filters: - RewriteResponseHeader=X-Response-Foo, , password=[^&]+, password=*** @@ -781,7 +781,7 @@ and have it applied to all routes.
SaveSession GatewayFilter Factory The SaveSession GatewayFilter Factory forces a WebSession::save operation before forwarding the call downstream. This is of particular use when -using something like Spring Session with a lazy data store and need to ensure the session state has been saved before making the forwarded call. +using something like Spring Session with a lazy data store and need to ensure the session state has been saved before making the forwarded call. application.yml @@ -790,14 +790,14 @@ using something like S gateway: routes: - id: save_session - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/** filters: - SaveSession -If you are integrating Spring Security with Spring Session, and want to ensure security details have been forwarded to the remote process, this is critical. +If you are integrating Spring Security with Spring Session, and want to ensure security details have been forwarded to the remote process, this is critical.
SecureHeaders GatewayFilter Factory @@ -869,7 +869,7 @@ using something like S gateway: routes: - id: setpath_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/{segment} filters: @@ -889,7 +889,7 @@ using something like S gateway: routes: - id: setresponseheader_route - uri: http://example.org + uri: https://example.org filters: - SetResponseHeader=X-Response-Foo, Bar @@ -907,11 +907,11 @@ using something like S gateway: routes: - id: setstatusstring_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=BAD_REQUEST - id: setstatusint_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=401 @@ -1312,13 +1312,13 @@ or check if an exchange has already been routed. gateway: routes: - id: setstatus_route - uri: http://example.org + uri: https://example.org filters: - name: SetStatus args: status: 401 - id: setstatusshortcut_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=401 @@ -1426,7 +1426,7 @@ spring.cloud.gateway.discovery.locator.filters[1].args[replacement]: "'/${remain globalcors: corsConfigurations: '[/**]': - allowedOrigins: "http://docs.spring.io" + allowedOrigins: "https://docs.spring.io" allowedMethods: - GET @@ -1544,7 +1544,7 @@ management.endpoints.web.exposure.include=gateway "args": {"_genkey_0":"/first"} }], "filters": [], - "uri": "http://www.uri-destination.org", + "uri": "https://www.uri-destination.org", "order": 0 }] The following table describes the structure of the response. diff --git a/font-awesome/font/fontawesome-webfont.svg b/font-awesome/font/fontawesome-webfont.svg index 2edb4ec3..8b349d50 100755 --- a/font-awesome/font/fontawesome-webfont.svg +++ b/font-awesome/font/fontawesome-webfont.svg @@ -1,5 +1,5 @@ - + diff --git a/spring-cloud-gateway.xml b/spring-cloud-gateway.xml index 4be28f54..18a224d3 100644 --- a/spring-cloud-gateway.xml +++ b/spring-cloud-gateway.xml @@ -14,7 +14,7 @@ How to Include Spring Cloud Gateway To include Spring Cloud Gateway in your project use the starter with group org.springframework.cloud -and artifact id spring-cloud-starter-gateway. See the Spring Cloud Project page +and artifact id spring-cloud-starter-gateway. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train. If you include the starter, but, for some reason, you do not want the gateway to be enabled, set spring.cloud.gateway.enabled=false. @@ -37,10 +37,10 @@ working with Spring Cloud Gateway. Route: Route the basic building block of the gateway. It is defined by an ID, a destination URI, a collection of predicates and a collection of filters. A route is matched if aggregate predicate is true. -Predicate: This is a Java 8 Function Predicate. The input type is a Spring Framework ServerWebExchange. This allows developers to match on anything from the HTTP request, such as headers or parameters. +Predicate: This is a Java 8 Function Predicate. The input type is a Spring Framework ServerWebExchange. This allows developers to match on anything from the HTTP request, such as headers or parameters. -Filter: These are instances Spring Framework GatewayFilter constructed in with a specific factory. Here, requests and responses can be modified before or after sending the downstream request. +Filter: These are instances Spring Framework GatewayFilter constructed in with a specific factory. Here, requests and responses can be modified before or after sending the downstream request. @@ -73,7 +73,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: after_route - uri: http://example.org + uri: https://example.org predicates: - After=2017-01-20T17:42:47.789-07:00[America/Denver] @@ -91,7 +91,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: before_route - uri: http://example.org + uri: https://example.org predicates: - Before=2017-01-20T17:42:47.789-07:00[America/Denver] @@ -109,7 +109,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: between_route - uri: http://example.org + uri: https://example.org predicates: - Between=2017-01-20T17:42:47.789-07:00[America/Denver], 2017-01-21T17:42:47.789-07:00[America/Denver] @@ -127,7 +127,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: cookie_route - uri: http://example.org + uri: https://example.org predicates: - Cookie=chocolate, ch.p @@ -145,7 +145,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: header_route - uri: http://example.org + uri: https://example.org predicates: - Header=X-Request-Id, \d+ @@ -163,7 +163,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: host_route - uri: http://example.org + uri: https://example.org predicates: - Host=**.somehost.org,**.anotherhost.org @@ -183,7 +183,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: method_route - uri: http://example.org + uri: https://example.org predicates: - Method=GET @@ -201,7 +201,7 @@ working with Spring Cloud Gateway. gateway: routes: - id: host_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/{segment},/bar/{segment} @@ -224,7 +224,7 @@ String segment = uriVariables.get("segment"); gateway: routes: - id: query_route - uri: http://example.org + uri: https://example.org predicates: - Query=baz @@ -238,7 +238,7 @@ String segment = uriVariables.get("segment"); gateway: routes: - id: query_route - uri: http://example.org + uri: https://example.org predicates: - Query=foo, ba. @@ -256,7 +256,7 @@ String segment = uriVariables.get("segment"); gateway: routes: - id: remoteaddr_route - uri: http://example.org + uri: https://example.org predicates: - RemoteAddr=192.168.1.1/24 @@ -343,7 +343,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: add_request_header_route - uri: http://example.org + uri: https://example.org filters: - AddRequestHeader=X-Request-Foo, Bar @@ -361,7 +361,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: add_request_parameter_route - uri: http://example.org + uri: https://example.org filters: - AddRequestParameter=foo, bar @@ -379,7 +379,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i gateway: routes: - id: add_request_header_route - uri: http://example.org + uri: https://example.org filters: - AddResponseHeader=X-Response-Foo, Bar @@ -390,7 +390,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i Hystrix GatewayFilter Factory Hystrix is a library from Netflix that implements the circuit breaker pattern. The Hystrix GatewayFilter allows you to introduce circuit breakers to your gateway routes, protecting your services from cascading failures and allowing you to provide fallback responses in the event of downstream failures. -To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix. +To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix. The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand. application.yml @@ -400,7 +400,7 @@ The Hystrix GatewayFilter allows you to introduce circuit breakers to your gatew gateway: routes: - id: hystrix_route - uri: http://example.org + uri: https://example.org filters: - Hystrix=myCommandName @@ -530,7 +530,7 @@ their default values: gateway: routes: - id: prefixpath_route - uri: http://example.org + uri: https://example.org filters: - PrefixPath=/mypath @@ -548,7 +548,7 @@ their default values: gateway: routes: - id: preserve_host_route - uri: http://example.org + uri: https://example.org filters: - PreserveHostHeader @@ -595,7 +595,7 @@ spring.cloud.gateway.routes[0].filters[0]=RequestRateLimiter=2, 2, #{@userkeyres gateway: routes: - id: requestratelimiter_route - uri: http://example.org + uri: https://example.org filters: - name: RequestRateLimiter args: @@ -622,7 +622,7 @@ KeyResolver userKeyResolver() { gateway: routes: - id: requestratelimiter_route - uri: http://example.org + uri: https://example.org filters: - name: RequestRateLimiter args: @@ -643,12 +643,12 @@ KeyResolver userKeyResolver() { gateway: routes: - id: prefixpath_route - uri: http://example.org + uri: https://example.org filters: - - RedirectTo=302, http://acme.org + - RedirectTo=302, https://acme.org -This will send a status 302 with a Location:http://acme.org header to perform a redirect. +This will send a status 302 with a Location:https://acme.org header to perform a redirect.
RemoveHopByHopHeadersFilter GatewayFilter Factory @@ -693,7 +693,7 @@ KeyResolver userKeyResolver() { gateway: routes: - id: removerequestheader_route - uri: http://example.org + uri: https://example.org filters: - RemoveRequestHeader=X-Request-Foo @@ -711,7 +711,7 @@ KeyResolver userKeyResolver() { gateway: routes: - id: removeresponseheader_route - uri: http://example.org + uri: https://example.org filters: - RemoveResponseHeader=X-Response-Foo @@ -732,7 +732,7 @@ and have it applied to all routes. gateway: routes: - id: rewritepath_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/** filters: @@ -752,7 +752,7 @@ and have it applied to all routes. gateway: routes: - id: rewriteresponseheader_route - uri: http://example.org + uri: https://example.org filters: - RewriteResponseHeader=X-Response-Foo, , password=[^&]+, password=*** @@ -762,7 +762,7 @@ and have it applied to all routes.
SaveSession GatewayFilter Factory The SaveSession GatewayFilter Factory forces a WebSession::save operation before forwarding the call downstream. This is of particular use when -using something like Spring Session with a lazy data store and need to ensure the session state has been saved before making the forwarded call. +using something like Spring Session with a lazy data store and need to ensure the session state has been saved before making the forwarded call. application.yml @@ -771,14 +771,14 @@ using something like S gateway: routes: - id: save_session - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/** filters: - SaveSession -If you are integrating Spring Security with Spring Session, and want to ensure security details have been forwarded to the remote process, this is critical. +If you are integrating Spring Security with Spring Session, and want to ensure security details have been forwarded to the remote process, this is critical.
SecureHeaders GatewayFilter Factory @@ -850,7 +850,7 @@ using something like S gateway: routes: - id: setpath_route - uri: http://example.org + uri: https://example.org predicates: - Path=/foo/{segment} filters: @@ -870,7 +870,7 @@ using something like S gateway: routes: - id: setresponseheader_route - uri: http://example.org + uri: https://example.org filters: - SetResponseHeader=X-Response-Foo, Bar @@ -888,11 +888,11 @@ using something like S gateway: routes: - id: setstatusstring_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=BAD_REQUEST - id: setstatusint_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=401 @@ -1293,13 +1293,13 @@ or check if an exchange has already been routed. gateway: routes: - id: setstatus_route - uri: http://example.org + uri: https://example.org filters: - name: SetStatus args: status: 401 - id: setstatusshortcut_route - uri: http://example.org + uri: https://example.org filters: - SetStatus=401 @@ -1407,7 +1407,7 @@ spring.cloud.gateway.discovery.locator.filters[1].args[replacement]: "'/${remain globalcors: corsConfigurations: '[/**]': - allowedOrigins: "http://docs.spring.io" + allowedOrigins: "https://docs.spring.io" allowedMethods: - GET @@ -1525,7 +1525,7 @@ management.endpoints.web.exposure.include=gateway "args": {"_genkey_0":"/first"} }], "filters": [], - "uri": "http://www.uri-destination.org", + "uri": "https://www.uri-destination.org", "order": 0 }] The following table describes the structure of the response.