MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / clientIP

Function clientIP

internal/agent/api.go:1588–1590  ·  view source on GitHub ↗

clientIP keys the per-IP limiters on the same trusted source as the DCR limiter: CF-Connecting-IP only, never the client-controlled X-Forwarded-For (see dcrSourceIP for the full rationale and the origin-firewall caveat). Delegating keeps every per-IP surface identical and impossible to drift apart.

(r *http.Request)

Source from the content-addressed store, hash-verified

1586// origin-firewall caveat). Delegating keeps every per-IP surface
1587// identical and impossible to drift apart.
1588func clientIP(r *http.Request) string {
1589 return dcrSourceIP(r)
1590}

Callers 1

handleFeedbackMethod · 0.70

Calls 1

dcrSourceIPFunction · 0.85

Tested by

no test coverage detected