Documentation
¶
Index ¶
Constants ¶
View Source
const ( Origin = "origin" AccessControlRequestMethod = "Access-Control-Request-Method" )
cors client request header
View Source
const ( AccessControlAllowOrigin = "Access-Control-Allow-Origin" AccessControlAllowHeaders = "Access-Control-Allow-AccessAllowHeaders" AccessControlAllowMethods = "Access-Control-Allow-AccessAllowsMethods" AccessControlExposeHeaders = "Access-Control-Expose-AccessAllowHeaders" AccessControlMaxAge = "Access-Control-Max-Age" AccessControlAllowCredentials = "Access-Control-Allow-Credentials" )
cors server response header
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cors ¶
type Cors struct {
Enabled bool `mapstructure:"enable"`
AllowOrigins []string `mapstructure:"allowOrigins"`
AllowMethods []string `mapstructure:"allowMethods"`
AllowHeaders []string `mapstructure:"allowHeaders"`
ExposeHeaders []string `mapstructure:"exposedHeaders"`
MaxAge int64 `mapstructure:"maxAge"`
AllowCredentials bool `mapstructure:"allowCredentials"`
}
func (Cors) AccessAllowHeaders ¶
func (Cors) AccessAllowMethods ¶
func (Cors) AccessCredentials ¶
func (Cors) AccessExposedHeaders ¶
func (Cors) AccessMaxAge ¶
Click to show internal directories.
Click to hide internal directories.