add OCIS_URL env var
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -28,6 +28,10 @@ func Gateway(cfg *config.Config) *cli.Command {
|
||||
cfg.Reva.Gateway.Services = c.StringSlice("service")
|
||||
cfg.Reva.StorageRegistry.Rules = c.StringSlice("storage-registry-rule")
|
||||
|
||||
if cfg.Reva.DataGateway.PublicURL == "" {
|
||||
cfg.Reva.DataGateway.PublicURL == strings.TrimRight(cfg.Reva.Frontend.PublicURL, "/")+"/data"
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
|
||||
@@ -24,7 +24,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "oidc-issuer",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "OIDC issuer",
|
||||
EnvVars: []string{"STORAGE_OIDC_ISSUER"},
|
||||
EnvVars: []string{"STORAGE_OIDC_ISSUER", "OCIS_URL"}, // STORAGE_OIDC_ISSUER takes precedence over OCIS_URL
|
||||
Destination: &cfg.Reva.OIDC.Issuer,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
|
||||
@@ -80,7 +80,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "public-url",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"},
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL", "OCIS_URL"}, // STORAGE_FRONTEND_PUBLIC_URL takes precedence over OCIS_URL
|
||||
Destination: &cfg.Reva.Frontend.PublicURL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
|
||||
@@ -146,13 +146,13 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "public-url",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"},
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL", "OCIS_URL"}, // STORAGE_FRONTEND_PUBLIC_URL takes precedence over OCIS_URL
|
||||
Destination: &cfg.Reva.Frontend.PublicURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "datagateway-url",
|
||||
Value: "https://localhost:9200/data",
|
||||
Usage: "URL to use for the storage datagateway",
|
||||
Value: "",
|
||||
Usage: "URL to use for the storage datagateway, defaults to <STORAGE_FRONTEND_PUBLIC_URL>/data",
|
||||
EnvVars: []string{"STORAGE_DATAGATEWAY_PUBLIC_URL"},
|
||||
Destination: &cfg.Reva.DataGateway.PublicURL,
|
||||
},
|
||||
|
||||
@@ -84,7 +84,7 @@ func LDAPWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "ldap-idp",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "Identity provider to use for users",
|
||||
EnvVars: []string{"STORAGE_LDAP_IDP"},
|
||||
EnvVars: []string{"STORAGE_LDAP_IDP", "OCIS_URL"}, // STORAGE_LDAP_IDP takes precedence over OCIS_URL
|
||||
Destination: &cfg.Reva.LDAP.IDP,
|
||||
},
|
||||
// ldap dn is always the dn
|
||||
|
||||
Reference in New Issue
Block a user