MCPcopy Index your code
hub / github.com/coder/coder / WithBehavior

Function WithBehavior

coderd/workspaceapps/cors/cors.go:12–14  ·  view source on GitHub ↗

WithBehavior sets the CORS behavior for the given context.

(ctx context.Context, behavior codersdk.CORSBehavior)

Source from the content-addressed store, hash-verified

10
11// WithBehavior sets the CORS behavior for the given context.
12func WithBehavior(ctx context.Context, behavior codersdk.CORSBehavior) context.Context {
13 return context.WithValue(ctx, contextKeyBehavior{}, behavior)
14}
15
16// HasBehavior returns true if the given context has the specified CORS behavior.
17func HasBehavior(ctx context.Context, behavior codersdk.CORSBehavior) bool {

Callers 1

determineCORSBehaviorMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected