Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // EnableMiddleware indicates whether or not CORS middleware is enabled to // enforce policies on cross origin requests EnableMiddleware bool // AllowedOrigins indicates which origins allow responses to be populated // with headers to allow cross origin requests (e.g. "*" or // "https://example.com") AllowedOrigins string // AllowedMethods indicates which methods allow responses to be populated // with headers to allow cross origin requests (e.g. "POST, GET, OPTIONS, // PUT, DELETE") AllowedMethods string // AllowedHeaders indicates which headers are allowed for cross origin // requests (e.g. "*" or "Accept, Content-Type, Content-Length") AllowedHeaders string }
Config contains configuration for the cors package
func (Config) GetHTTPServerMiddleware ¶
func (c Config) GetHTTPServerMiddleware() mux.MiddlewareFunc
GetHTTPServerMiddleware returns middleware that adds cors header options to the response and short-circuits further request processing if the request method is OPTIONS.
func (*Config) RegisterFlags ¶
RegisterFlags registers JOSE flags with pflags
Click to show internal directories.
Click to hide internal directories.