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
Describe the bug
I use reverse proxy who add the headers X-Forwarded-* in front of the gateway and a backend spring-boot application behind the gateway.
On the backend spring boot application i use the property server.forward-headers-strategy=FRAMEWORK, the problem is that in spring framework web ForwardedHeaderUtils#adaptFromForwardedHeaders (use in ForwardedHeaderFilter#ForwardedHeaderExtractingRequest) check the header Forwarded before the header X-Forwarded-*
Use the X-Forward-* header to build the header Forwarded in ForwardedRequestHeadersFilter or disable if the header X-Forwarded-* is present
Workaround
For the moment i override ForwardedRequestHeadersFilter
From spring.cloud.gateway.x-forwarded to spring.cloud.gateway.mvc.x-forwarded-request-headers-filter. Deprecates the later.
The XForwardedRequestHeadersFilter bean is conditional on the x-forwarded-request-headers-filter.enabled property.
Fixesgh-3238
Describe the bug
I use reverse proxy who add the headers
X-Forwarded-*
in front of the gateway and a backend spring-boot application behind the gateway.On the backend spring boot application i use the property
server.forward-headers-strategy=FRAMEWORK
, the problem is that in spring framework webForwardedHeaderUtils#adaptFromForwardedHeaders
(use inForwardedHeaderFilter#ForwardedHeaderExtractingRequest
) check the header Forwarded before the header X-Forwarded-*Use the X-Forward-* header to build the header Forwarded in ForwardedRequestHeadersFilter or disable if the header X-Forwarded-* is present
Workaround
For the moment i override
ForwardedRequestHeadersFilter
The text was updated successfully, but these errors were encountered: