1Panel/backend/configs/cors.go

15 lines
456 B
Go
Raw Normal View History

2022-08-16 23:30:23 +08:00
package configs
type CORS struct {
Mode string `mapstructure:"mode"`
WhiteList []CORSWhiteList `mapstructure:"whitelist"`
}
type CORSWhiteList struct {
AllowOrigin string `mapstructure:"allow-origin"`
AllowMethods string `mapstructure:"allow-methods"`
AllowHeaders string `mapstructure:"allow-headers"`
ExposeHeaders string `mapstructure:"expose-headers"`
AllowCredentials bool `mapstructure:"allow-credentials"`
}