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

Function userFromContext

internal/httpapi/ratelimit.go:128–133  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

126}
127
128func userFromContext(ctx context.Context) *identity.User {
129 if p := principalFromContext(ctx); p != nil {
130 return p.User
131 }
132 return nil
133}
134
135// clientIP extracts the caller IP for per-IP limiting. It trusts only
136// CF-Connecting-IP (set by Cloudflare and stripped from inbound requests

Callers

nothing calls this directly

Calls 1

principalFromContextFunction · 0.85

Tested by

no test coverage detected