You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When spring-cloud-gateway adds an X-Forward-Prefix header to a request on which an X-Forwarded-Prefix header is already present, the second value is added to the header separating both using comma.
This is currently not supported by the ForwardedHeaderFilter. The Filter prefixes the path with the full value of the Header, adding the commas to the Path. I haven't tested this with Webflux, but looking at ForwardedHeaderTransformer it doesn't seem to support this either.
bclozel
changed the title
Support multi value X-Forwarded-Prefix headers generated by spring-cloud-gateway
Support multi-value X-Forwarded-Prefix headers
Jun 18, 2020
Prior to this commit, the Forwarded headers for Spring MVC and Spring
WebFlux did not support multiple prefix values for the
`"X-Forwarded-Prefix"` HTTP header.
This commit splits and processes multiple prefixes defined in the
dedicated header.
Closesspring-projectsgh-25254
When spring-cloud-gateway adds an X-Forward-Prefix header to a request on which an X-Forwarded-Prefix header is already present, the second value is added to the header separating both using comma.
This is currently not supported by the ForwardedHeaderFilter. The Filter prefixes the path with the full value of the Header, adding the commas to the Path. I haven't tested this with Webflux, but looking at ForwardedHeaderTransformer it doesn't seem to support this either.
I first opened this as an issue on the spring-cloud-gateway tracker (spring-cloud/spring-cloud-gateway#1772) after some discussion with @spencergibb we decided to move this over here.
The text was updated successfully, but these errors were encountered: