MCPcopy
hub / github.com/gofiber/fiber / hasTrustedProxyConfig

Method hasTrustedProxyConfig

req.go:704–707  ·  view source on GitHub ↗

hasTrustedProxyConfig returns true if any trusted proxy configuration is set.

()

Source from the content-addressed store, hash-verified

702
703// hasTrustedProxyConfig returns true if any trusted proxy configuration is set.
704func (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.
710func (r *DefaultReq) isTrustedProxyIP(ipStr string) bool {

Callers 1

extractIPFromHeaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected