Browse Source

document alreadyrouted apis. (#363)

Fixes #74
pull/365/head
Ryan Baxter 7 years ago committed by Spencer Gibb
parent
commit
d2bdf4a13b
  1. 10
      docs/src/main/asciidoc/spring-cloud-gateway.adoc

10
docs/src/main/asciidoc/spring-cloud-gateway.adoc

@ -784,6 +784,16 @@ The Websocket Routing Filter runs if the url located in the `ServerWebExchangeUt @@ -784,6 +784,16 @@ The Websocket Routing Filter runs if the url located in the `ServerWebExchangeUt
Websockets may be load-balanced by prefixing the URI with `lb`, such as `lb:ws://serviceid`.
=== Making An Exchange As Routed
After the Gateway has routed a `ServerWebExchange` it will mark that exchange as "routed" by adding `gatewayAlreadyRouted`
to the exchange attributes. Once a request has been marked as routed, other routing filters will not route the request again,
essentially skipping the filter. There are convenience methods that you can use to mark an exchange as routed
or check if an exchange has already been routed.
* `ServerWebExchangeUtils.isAlreadyRouted` takes a `ServerWebExchange` object and checks if it has been "routed"
* `ServerWebExchangeUtils.setAlreadyRouted` takes a `ServerWebExchange` object and marks it as "routed"
== Configuration
Configuration for Spring Cloud Gateway is driven by a collection of `RouteDefinitionLocator`s.

Loading…
Cancel
Save