Skip to content

添加响应头过滤器

此过滤器是Spring Cloud Gateway官方提供的过滤器,具体代码在spring-cloud-gateway-core 的jar包的AddResponseHeaderGatewayFilterFactory类中。

此过滤器是对于所有匹配的请求,添加一个响应头参数。

1. 使用方法

在网关拓扑中选择要添加过滤器的服务,选择添加响应头(ResponseHeader)过滤器,输入自己所要添加的响应头和值即可。