diff --git a/website/docs/guide/ip-address.md b/website/docs/guide/ip-address.md index 9094a044..ac0c7639 100644 --- a/website/docs/guide/ip-address.md +++ b/website/docs/guide/ip-address.md @@ -77,8 +77,10 @@ E.g.: ```go e.IPExtractor = echo.ExtractIPFromXFFHeader( - TrustLinkLocal(false), - TrustIPRanges(lbIPRange), + echo.TrustLoopback(false), // e.g. ipv4 start with 127. + echo.TrustLinkLocal(false), // e.g. ipv4 start with 169.254 + echo.TrustPrivateNet(false), // e.g. ipv4 start with 10. or 192.168 + echo.TrustIPRange(lbIPRange), ) ``` @@ -106,4 +108,4 @@ Again, it trusts internal IP addresses by default (loopback, link-local unicast, In default behavior, Echo sees all of first XFF header, X-Real-IP header and IP from network layer. As you might already notice, after reading this article, this is not good. -Sole reason this is default is just backward compatibility. \ No newline at end of file +Sole reason this is default is just backward compatibility.