Files
opencloud/extensions/accounts/pkg/config/http.go
Christian Richter 2089ac5f7b refactor accounts
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-04-13 17:04:35 +02:00

19 lines
735 B
Go

package config
// HTTP defines the available http configuration.
type HTTP struct {
Addr string `yaml:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
Namespace string `yaml:"-"`
Root string `yaml:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
CacheTTL int `yaml:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
CORS CORS `yaml:"cors"`
}
// CORS defines the available cors configuration.
type CORS struct {
AllowedOrigins []string `yaml:"allowed_origins"`
AllowedMethods []string `yaml:"allowed_methods"`
AllowedHeaders []string `yaml:"allowed_headers"`
AllowCredentials bool `yaml:"allowed_credentials"`
}