Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFieldSpec ¶ added in v3.63.0
ClientFieldSpec returns a field spec for an http client component.
func ServerCORSFieldSpec ¶ added in v3.63.0
ServerCORSFieldSpec returns a field spec for an http server CORS component.
Types ¶
type ServerCORS ¶ added in v3.63.0
type ServerCORS struct { Enabled bool `json:"enabled" yaml:"enabled"` AllowedOrigins []string `json:"allowed_origins" yaml:"allowed_origins"` }
ServerCORS contains configuration for allowing CORS headers.
func NewServerCORS ¶ added in v3.63.0
func NewServerCORS() ServerCORS
NewServerCORS returns a new server CORS config with default fields.
func (ServerCORS) WrapHandler ¶ added in v3.63.0
WrapHandler wraps a provided HTTP handler with middleware that enables CORS requests (when configured).
Click to show internal directories.
Click to hide internal directories.