hasTrustedProxyConfig returns true if any trusted proxy configuration is set.
()
| 702 | |
| 703 | // hasTrustedProxyConfig returns true if any trusted proxy configuration is set. |
| 704 | func (r *DefaultReq) hasTrustedProxyConfig() bool { |
| 705 | cfg := r.c.app.config.TrustProxyConfig |
| 706 | return len(cfg.ips) > 0 || len(cfg.ranges) > 0 || cfg.Loopback || cfg.Private || cfg.LinkLocal |
| 707 | } |
| 708 | |
| 709 | // isTrustedProxyIP checks whether the given IP string matches any configured trusted proxy. |
| 710 | func (r *DefaultReq) isTrustedProxyIP(ipStr string) bool { |