Spring Cloud 默认过滤器
如果您要添加过滤器并将其应用于所有路由,则可以使用spring.cloud.gateway.default-filters
。该属性采用过滤器列表
application.yml。
spring: cloud: gateway: default-filters: - AddResponseHeader=X-Response-Default-Foo, Default-Bar - PrefixPath=/httpbin
如果您要添加过滤器并将其应用于所有路由,则可以使用spring.cloud.gateway.default-filters
。该属性采用过滤器列表
application.yml。
spring: cloud: gateway: default-filters: - AddResponseHeader=X-Response-Default-Foo, Default-Bar - PrefixPath=/httpbin