mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
bring back CORS env vars (#4723)
* bring back CORS env vars Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update CORS descriptions Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align writing of 'A comma-separated ...' Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix some desc quotes Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Apply suggestions from code review Co-authored-by: Martin <github@diemattels.at> * Apply more suggestions from code review Co-authored-by: Martin <github@diemattels.at> * Apply final suggestions from code review Co-authored-by: Martin <github@diemattels.at> Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> Co-authored-by: Martin <github@diemattels.at>
This commit is contained in:
committed by
GitHub
parent
1008e39ac6
commit
e9e9947f88
@@ -2,10 +2,10 @@ package config
|
||||
|
||||
// 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:"allow_credentials"`
|
||||
AllowedOrigins []string `yaml:"allow_origins" env:"OCIS_CORS_ALLOW_ORIGINS;WEBDAV_CORS_ALLOW_ORIGINS" desc:"A comma-separated list of allowed CORS origins. See following chapter for more details: *Access-Control-Allow-Origin* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin"`
|
||||
AllowedMethods []string `yaml:"allow_methods" env:"OCIS_CORS_ALLOW_METHODS;WEBDAV_CORS_ALLOW_METHODS" desc:"A comma-separated list of allowed CORS methods. See following chapter for more details: *Access-Control-Request-Method* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method"`
|
||||
AllowedHeaders []string `yaml:"allow_headers" env:"OCIS_CORS_ALLOW_HEADERS;WEBDAV_CORS_ALLOW_HEADERS" desc:"A comma-separated list of allowed CORS headers. See following chapter for more details: *Access-Control-Request-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers."`
|
||||
AllowCredentials bool `yaml:"allow_credentials" env:"OCIS_CORS_ALLOW_CREDENTIALS;WEBDAV_CORS_ALLOW_CREDENTIALS" desc:"Allow credentials for CORS.See following chapter for more details: *Access-Control-Allow-Credentials* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials."`
|
||||
}
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
|
||||
Reference in New Issue
Block a user