Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cors ¶
type Cors struct {
// contains filtered or unexported fields
}
Cors struct which represents a native cors plugin for chi.
func NewCorsWithConfigPath ¶
NewCorsWithConfigPath returns a new cors with options from config path.
func NewCorsWithOptions ¶
NewCorsWithOptions returns a new cors with options.
type Options ¶
type Options struct { Enabled bool Allowed struct { Origins []string Headers []string Methods []string Credentials bool } Exposed struct { Headers []string } MaxAge int }
Options struct which represents cors plugin from chi options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
Click to show internal directories.
Click to hide internal directories.