Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 714

Springboot application is stripping off X-Forwarded-For header from the HttpServletRequest

$
0
0

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.


Viewing all articles
Browse latest Browse all 714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>