There are 2 ways to add request and response headers via a bean from RouteLocator or via properties.
However would need an example to add default filters (below) via a bean as the service-response-value
and service-request-value
would be a dynamic value :
spring
cloud:
gateway:
default-filters:
- AddRequestHeader= service-request, service-request-value
- AddResponseHeader= service-response, service-response-value
question from:
https://stackoverflow.com/questions/65846586/spring-gateway-adding-of-default-request-and-response-headers 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…