@@ -37,8 +37,8 @@ func DefaultConfig() *config.Config {
|
||||
Name: "webfinger",
|
||||
},
|
||||
|
||||
OcisURL: "https://localhost:9200",
|
||||
Relations: []string{relations.OpenIDConnectRel, relations.OwnCloudInstanceRel},
|
||||
OpenCloudURL: "https://localhost:9200",
|
||||
Relations: []string{relations.OpenIDConnectRel, relations.OwnCloudInstanceRel},
|
||||
Instances: []config.Instance{
|
||||
{
|
||||
Claim: "sub",
|
||||
@@ -83,11 +83,11 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
cfg.HTTP.TLS = cfg.Commons.HTTPServiceTLS
|
||||
}
|
||||
|
||||
if (cfg.Commons != nil && cfg.Commons.OcisURL != "") &&
|
||||
if (cfg.Commons != nil && cfg.Commons.OpenCloudURL != "") &&
|
||||
(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}
|
||||
cfg.HTTP.CORS.AllowedOrigins = []string{cfg.Commons.OpenCloudURL}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user