mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
make code more readable
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
@@ -185,8 +185,10 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey
|
||||
}
|
||||
|
||||
if (cfg.Commons != nil && cfg.Commons.OcisURL != "") && (cfg.HTTP.CORS.AllowedOrigins == nil && cfg.Commons != nil && cfg.Commons.OcisURL != "" ||
|
||||
len(cfg.HTTP.CORS.AllowedOrigins) == 1 && cfg.HTTP.CORS.AllowedOrigins[0] == "https://localhost:9200") {
|
||||
if (cfg.Commons != nil && cfg.Commons.OcisURL != "") &&
|
||||
(cfg.HTTP.CORS.AllowedOrigins == nil ||
|
||||
len(cfg.HTTP.CORS.AllowedOrigins) == 1 &&
|
||||
cfg.HTTP.CORS.AllowedOrigins[0] == "https://localhost:9200") {
|
||||
cfg.HTTP.CORS.AllowedOrigins = []string{cfg.Commons.OcisURL}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user