MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / IsInternalRequest

Function IsInternalRequest

internal/web/context.go:26–29  ·  view source on GitHub ↗

IsInternalRequest reports whether r was dispatched via InternalRequest rather than arriving over the network. Handlers can use this to skip audit logging, rate limiting, or other concerns that only apply to external callers.

(r *http.Request)

Source from the content-addressed store, hash-verified

24// than arriving over the network. Handlers can use this to skip audit logging,
25// rate limiting, or other concerns that only apply to external callers.
26func IsInternalRequest(r *http.Request) bool {
27 v, _ := r.Context().Value(internalCallerKey).(bool)
28 return v
29}
30
31// withTestModeContext returns a copy of ctx marked as a test-mode request.
32func withTestModeContext(ctx context.Context) context.Context {

Callers 5

RunWithMUDLockedFunction · 0.85
doBasicAuthFunction · 0.85
RequirePermissionFunction · 0.85
RequireAnyPermissionFunction · 0.85
RequireAdminFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected