Documentation ¶
Index ¶
Constants ¶
View Source
const (
RequestIdKey = "X-Request-Id"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CorsOption ¶
type CorsOption struct { Open bool `json:"open" yaml:"open"` // Open 是否开启跨域 MaxAge int `json:"maxAge" yaml:"maxAge"` // MaxAge AllowOrigin string `json:"allowOrigin" yaml:"allowOrigin"` // AllowOrigin 允许域名 AllowHeaders string `json:"allowHeaders" yaml:"allowHeaders"` // AllowHeaders 允许Header参数 AllowMethods string `json:"allowMethods" yaml:"allowMethods"` // AllowMethods 允许跨域的请求方式 ExposeHeaders string `json:"exposeHeaders" yaml:"exposeHeaders"` // ExposeHeaders 暴露的header参数 AllowCredentials string `json:"allowCredentials" yaml:"allowCredentials"` // AllowCredentials 允许https }
CorsOption 跨域配置
Click to show internal directories.
Click to hide internal directories.