You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
731 B

3 years ago
  1. package config
  2. type CORS struct {
  3. Mode string `mapstructure:"mode" json:"mode" yaml:"mode"`
  4. Whitelist []CORSWhitelist `mapstructure:"whitelist" json:"whitelist" yaml:"whitelist"`
  5. }
  6. type CORSWhitelist struct {
  7. AllowOrigin string `mapstructure:"allow-origin" json:"allow-origin" yaml:"allow-origin"`
  8. AllowMethods string `mapstructure:"allow-methods" json:"allow-methods" yaml:"allow-methods"`
  9. AllowHeaders string `mapstructure:"allow-headers" json:"allow-headers" yaml:"allow-headers"`
  10. ExposeHeaders string `mapstructure:"expose-headers" json:"expose-headers" yaml:"expose-headers"`
  11. AllowCredentials bool `mapstructure:"allow-credentials" json:"allow-credentials" yaml:"allow-credentials"`
  12. }