Last active
August 3, 2022 16:04
-
-
Save jkeam/9a70f68fe5576fd2ea93273a90d78d8b to your computer and use it in GitHub Desktop.
Drop all forwarded headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.web.filter.ForwardedHeaderFilter; | |
import org.springframework.context.annotation.Bean; | |
@Bean | |
public ForwardedHeaderFilter disabledForwardedHeaderFilter() { | |
ForwardedHeaderFilter filter = new ForwardedHeaderFilter(); | |
filter.setRemoveOnly(true); | |
return filter; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment