I have a SpringBoot application (SpringBoot Version: 3.1.7) with the embedded tomcat server. I noticed that my application is stripping off X-Forwarded-For
header from the HttpServletRequest
. I can be able to retain other default headers like Authorization
but not the X-Forwarded-For
. Can someone help what configuration change I should do in order to retain the forwarded-for headers.
I already try adding the below code in my property file:server.forward-headers-strategy=native
Even after setting the above property to native
or framework
, still not able to retrieve the X-Forwarded-For
header value.