MCPcopy Create free account
hub / github.com/chain/Core / newContextWithLocalhost

Function newContextWithLocalhost

net/http/authn/context.go:38–40  ·  view source on GitHub ↗

newContextWithLocalhost sets the localhost flag to `true` in a new context and returns that context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

36// newContextWithLocalhost sets the localhost flag to `true` in a new context
37// and returns that context.
38func newContextWithLocalhost(ctx context.Context) context.Context {
39 return context.WithValue(ctx, localhostKey, true)
40}
41
42// Localhost returns true if the localhost flag has been set.
43func Localhost(ctx context.Context) bool {

Callers 1

AuthenticateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected