spring-cloud-netflix
spring-cloud-netflix copied to clipboard
Zuul overwrites X-Forward-Prefix
A request with a "X-Forwarded-Prefix" header is overwritten by zuul only if route has prefix, so when stripPrefix is true.
Example:
route1:
path: /service/**
serviceId: service
route2:
path: /endpoint/**
serviceId: service
stripPrefix: false
curl on route1:
curl -H "Host: example.com" -H "X-Forwarded-Prefix: /api" localhost/endpoint
{
{},
"_links" : {
"self" : {
"href" : "http://example.com/api/endpoint"
}
}
}
curl on route2:
curl -H "Host: example.com" -H "X-Forwarded-Prefix: /api" localhost/service/endpoint
{
{},
"_links" : {
"self" : {
"href" : "http://example.com/service/endpoint"
}
}
}
I expected to be http://example.com/api/service/endpoint.
Should the "X-Forwarded-Prefix" header be concatened instead of overwritten ?
Seems reasonable. Are you sending a PR?
PR is here : #994