Fixes rough ordering of routes by id alphabetically.

This commit is contained in:
Spencer Gibb
2020-04-01 14:53:30 -04:00
parent 041a8dc08f
commit 5718f85a15

View File

@@ -68,6 +68,45 @@ spring:
filters:
- AddResponseHeader=X-Request-Foo, Bar
# =====================================
- id: circuitbreaker_exception_fallback_test
uri: ${test.uri}
predicates:
- Host=**.circuitbreakerexceptionfallback.org
filters:
- name: CircuitBreaker
args:
name: fallbackcmd
fallbackUri: forward:/circuitbreakerExceptionFallback
# =====================================
- id: circuitbreaker_fallback_test
uri: ${test.uri}
predicates:
- Host=**.circuitbreakerfallback.org
filters:
- name: CircuitBreaker
args:
name: fallbackcmd
fallbackUri: forward:/circuitbreakerFallbackController
# =====================================
- id: change_uri_test
uri: ${test.uri}
predicates:
- Host=**.changeuri.org
- Header=X-CF-Forwarded-Url
filters:
- RequestHeaderToRequestUri=X-CF-Forwarded-Url
# =====================================
- id: cloudfoundry_routeservice_test
uri: ${test.uri}
predicates:
- CloudFoundryRouteService=
filters:
- RequestHeaderToRequestUri=X-CF-Forwarded-Url
# =====================================
- id: dedupe_response_header_test
uri: ${test.uri}
@@ -89,32 +128,18 @@ spring:
- DedupeResponseHeader=Scout-Cookie, RETAIN_LAST
- DedupeResponseHeader=Next-Week-Lottery-Numbers, RETAIN_UNIQUE
# =====================================
- id: rewrite_response_header_test
uri: ${test.uri}
predicates:
- Host=**.rewriteresponseheader.org
- Path=/headers
filters:
- AddResponseHeader=X-Request-Foo, /42?user=ford&password=omg!what&flag=true
- RewriteResponseHeader=X-Request-Foo, password=[^&]+, password=***
# =====================================
- id: rewrite_location_response_header_test
uri: ${test.uri}
predicates:
- Host=**.rewritelocationresponseheader.org
- Path=/headers
filters:
- AddResponseHeader=Location, https://backend.org:443/v1/some/object/id
- RewriteLocationResponseHeader
# =====================================
- id: forward_test
uri: forward:/localcontroller
predicates:
- Host=**.forward.org
# =====================================
- id: header_test
uri: ${test.uri}
predicates:
- Header=Foo, .*
# =====================================
- id: host_backwards_compatible_test
uri: ${test.uri}
@@ -173,52 +198,6 @@ spring:
filters:
- Hystrix=successcmd
# =====================================
- id: sccb_success_test
uri: ${test.uri}
predicates:
- Host=**.sccbsuccess.org
filters:
- CircuitBreaker=successcmd
# =====================================
- id: sccb_timeout_test
uri: ${test.uri}
predicates:
- Host=**.sccbtimeout.org
filters:
- CircuitBreaker=timeoutcmd
# =====================================
- id: sccb_failure_test
uri: ${test.uri}
predicates:
- Host=**.sccbfailure.org
filters:
- CircuitBreaker=failcmd
# =====================================
- id: circuitbreaker_exception_fallback_test
uri: ${test.uri}
predicates:
- Host=**.circuitbreakerexceptionfallback.org
filters:
- name: CircuitBreaker
args:
name: fallbackcmd
fallbackUri: forward:/circuitbreakerExceptionFallback
# =====================================
- id: circuitbreaker_fallback_test
uri: ${test.uri}
predicates:
- Host=**.circuitbreakerfallback.org
filters:
- name: CircuitBreaker
args:
name: fallbackcmd
fallbackUri: forward:/circuitbreakerFallbackController
# =====================================
- id: load_balancer_client_test
uri: lb://testservice
@@ -272,6 +251,28 @@ spring:
filters:
- SetPath=/anything/multi{num}
# =====================================
- id: per_route_connect_timeout
uri: http://localhost:32167
predicates:
- name: Path
args:
pattern: /connect/delay/{timeout}
metadata:
connect-timeout: 5
# =====================================
- id: per_route_response_timeout
uri: ${test.uri}
predicates:
- name: Path
args:
pattern: /route/delay/{timeout}
filters:
- StripPrefix=1
metadata:
response-timeout: 1000
# =====================================
- id: redirect_to_test
uri: ${test.uri}
@@ -299,6 +300,50 @@ spring:
- AddResponseHeader=X-Request-Foo, Bar
- RemoveResponseHeader=X-Request-Foo
# =====================================
- id: rewrite_location_response_header_test
uri: ${test.uri}
predicates:
- Host=**.rewritelocationresponseheader.org
- Path=/headers
filters:
- AddResponseHeader=Location, https://backend.org:443/v1/some/object/id
- RewriteLocationResponseHeader
# =====================================
- id: rewrite_response_header_test
uri: ${test.uri}
predicates:
- Host=**.rewriteresponseheader.org
- Path=/headers
filters:
- AddResponseHeader=X-Request-Foo, /42?user=ford&password=omg!what&flag=true
- RewriteResponseHeader=X-Request-Foo, password=[^&]+, password=***
# =====================================
- id: sccb_failure_test
uri: ${test.uri}
predicates:
- Host=**.sccbfailure.org
filters:
- CircuitBreaker=failcmd
# =====================================
- id: sccb_success_test
uri: ${test.uri}
predicates:
- Host=**.sccbsuccess.org
filters:
- CircuitBreaker=successcmd
# =====================================
- id: sccb_timeout_test
uri: ${test.uri}
predicates:
- Host=**.sccbtimeout.org
filters:
- CircuitBreaker=timeoutcmd
# =====================================
- id: secure_headers_test
uri: ${test.uri}
@@ -325,15 +370,6 @@ spring:
filters:
- SetPath=/{subdomain}
# =====================================
- id: strip_prefix_test
uri: ${test.uri}
predicates:
- Host=**.stripprefix.org
- Path=/foo/**
filters:
- StripPrefix=2
# =====================================
- id: set_response_header_test
uri: ${test.uri}
@@ -365,6 +401,15 @@ spring:
filters:
- SetStatus=BAD_REQUEST
# =====================================
- id: strip_prefix_test
uri: ${test.uri}
predicates:
- Host=**.stripprefix.org
- Path=/foo/**
filters:
- StripPrefix=2
# =====================================
- id: rewrite_path_test
uri: ${test.uri}
@@ -377,45 +422,7 @@ spring:
- AddRequestHeader=X-Request-Foo, Bar
- AddRequestHeader=X-Request-Baz, Bat
# =====================================
- id: weight_high_test
uri: ${test.uri}
predicates:
- Host=**.weighthigh.org
- Weight=group1, 8
# =====================================
- id: header_test
uri: ${test.uri}
predicates:
- Header=Foo, .*
# =====================================
- id: change_uri_test
uri: ${test.uri}
predicates:
- Host=**.changeuri.org
- Header=X-CF-Forwarded-Url
filters:
- RequestHeaderToRequestUri=X-CF-Forwarded-Url
# =====================================
- id: cloudfoundry_routeservice_test
uri: ${test.uri}
predicates:
- CloudFoundryRouteService=
filters:
- RequestHeaderToRequestUri=X-CF-Forwarded-Url
# =====================================
- id: default_path_to_httpbin
uri: ${test.uri}
order: 10000
predicates:
- name: Path
args:
pattern: /**
# =====================================
# =====================================
- id: route_with_metadata
uri: ${test.uri}
order: 10000
@@ -426,28 +433,25 @@ spring:
metadata:
optionName: "OptionValue"
compositeObject:
name: "value"
name: "value"
iAmNumber: 1
# =====================================
- id: per_route_response_timeout
- id: weight_high_test
uri: ${test.uri}
predicates:
- name: Path
args:
pattern: /route/delay/{timeout}
filters:
- StripPrefix=1
metadata:
response-timeout: 1000
- Host=**.weighthigh.org
- Weight=group1, 8
# =====================================
- id: per_route_connect_timeout
uri: http://localhost:32167
# should be last and not follow alphabetical order
- id: default_path_to_httpbin
uri: ${test.uri}
order: 10000
predicates:
- name: Path
args:
pattern: /connect/delay/{timeout}
metadata:
connect-timeout: 5
- name: Path
args:
pattern: /**
hystrix.command.successcmd.execution.isolation.thread.timeoutInMilliseconds: 5000