- the classes extending this class, `GatewayControllerEndpoint` and `GatewayLegacyControllerEndpoint`, use the new constructor that handles the base path being overridden
- any other classes using the deprecated constructor would use the fixed base path `/actuator`
Adds an optional boolean parameter to the RedirectTo filter to indicate whether the request query parameters should be included on the `url`. The parameter is treated as false when not set to preserve backwards compatibility.
The `RewriteRequestParameter` `GatewayFilter` factory takes a `name` parameter and a `replacement` parameter.
It will rewrite the value of the request parameter of the given `name`.
summary:
1. Inputs / expected result in order assuming Cache TTL configured to 120s
* Request contains `no-store` or `private`
* (done) Cache is skipped without storing response and `Cache-Control` will come from upstream
* Request contains `no-cache`
* The cached response is ignored by SCG dispatching to upstream(we cannot return 304 - imagine a client sends no-cache waiting for the server to revalidate and returns fresh data but instead it receives a bodyless response 304)
* A) Fresh response coming from upstream is renewed in the SCG cache and `Cache-Control: max-age=120s`. Other clients will see max-age increased
* B) Fresh response coming from upstream is not stored. Other clients will not be affected.
* Otherwise (ignoring `ETag`, `If-Modified-Since` and other request directives
* if Response is not cached in SCG yet
* `Cache-Control: max-age=120` (no-cache, no-store and must-revalidate doesn't make sense)
* if Response is cached in SCG with remaining TTL = 30s
* `Cache-Control: max-age=30` (no-cache, no-store and must-revalidate doesn't make sense)
* if Response is cached in SCG with remaining TTL = 0s
* `Cache-Control: max-age=0,no-cache,must-revalidate` (max-age=0+must-revalidate is equivalent to no-cache)
2. Revalidation is out of scope but it can be added in the future (ETag, If-Modified-Since, Modified-Since)
Since Random can't be mocked in jdk17+, replace the settable Random with Supplier<Double>. Production should still use ThreadLoacalRandom unless the supplier is set.
This moves the removal of GATEWAY_PREDICATE_PATH_CONTAINER_ATTR to ServerWebExchangeUtils.handle() which is now used in SpringCloudCircuitBreakerFilterFactory and ForwardRoutingFilter.
Fixes gh-2950