mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-14 04:17:36 -04:00
Allow for disabling the certificate check for webdav connections
This commit is contained in:
@@ -31,6 +31,7 @@ type Config struct {
|
||||
OCMProviderAuthorizerDrivers OCMProviderAuthorizerDrivers `yaml:"ocm_provider_authorizer_drivers"`
|
||||
OCMShareProvider OCMShareProvider `yaml:"ocm_share_provider"`
|
||||
OCMCore OCMCore `yaml:"ocm_core"`
|
||||
OCMStorageProvider OCMStorageProvider `yaml:"ocm_storage_provider"`
|
||||
|
||||
Supervised bool `yaml:"-"`
|
||||
Context context.Context `yaml:"-"`
|
||||
@@ -108,6 +109,9 @@ type OCMCore struct {
|
||||
Driver string `yaml:"driver" env:"OCM_OCM_CORE_DRIVER" desc:"Driver to be used for the OCM core. Supported value is only 'json'."`
|
||||
Drivers OCMCoreDrivers `yaml:"drivers"`
|
||||
}
|
||||
type OCMStorageProvider struct {
|
||||
Insecure bool `yaml:"insecure" env:"OCM_OCM_STORAGE_PROVIDER_INSECURE" desc:"Disable TLS certificate validation for the OCM connections. Do not set this in production environments."`
|
||||
}
|
||||
|
||||
type OCMCoreDrivers struct {
|
||||
JSON OCMCoreJSONDriver `yaml:"json"`
|
||||
@@ -118,9 +122,9 @@ type OCMCoreJSONDriver struct {
|
||||
}
|
||||
|
||||
type OCMShareProvider struct {
|
||||
Driver string `yaml:"driver" env:"OCM_OCM_SHARE_PROVIDER_DRIVER" desc:"Driver to be used for the OCM share provider. Supported value is only 'json'."`
|
||||
Drivers OCMShareProviderDrivers `yaml:"drivers"`
|
||||
Insecure bool `yaml:"insecure" env:"OCM_OCM_SHARE_PROVIDER_INSECURE" desc:"Disable TLS certificate validation for the OCM connections. Do not set this in production environments."`
|
||||
Driver string `yaml:"driver" env:"OCM_OCM_SHARE_PROVIDER_DRIVER" desc:"Driver to be used for the OCM share provider. Supported value is only 'json'."`
|
||||
Drivers OCMShareProviderDrivers `yaml:"drivers"`
|
||||
Insecure bool `yaml:"insecure" env:"OCM_OCM_SHARE_PROVIDER_INSECURE" desc:"Disable TLS certificate validation for the OCM connections. Do not set this in production environments."`
|
||||
WebappTemplate string `yaml:"webapp_template" env:"OCM_WEBAPP_TEMPLATE" desc:"Template for the webapp url."`
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,9 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"prefix": "data",
|
||||
"driver": "ocmreceived",
|
||||
"drivers": map[string]interface{}{
|
||||
"ocmreceived": map[string]interface{}{},
|
||||
"ocmreceived": map[string]interface{}{
|
||||
"insecure": cfg.OCMStorageProvider.Insecure,
|
||||
},
|
||||
},
|
||||
"data_txs": map[string]interface{}{
|
||||
"simple": map[string]interface{}{
|
||||
@@ -127,7 +129,12 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
},
|
||||
},
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": "ocmreceived",
|
||||
"driver": "ocmreceived",
|
||||
"drivers": map[string]interface{}{
|
||||
"ocmreceived": map[string]interface{}{
|
||||
"insecure": cfg.OCMStorageProvider.Insecure,
|
||||
},
|
||||
},
|
||||
"data_server_url": "http://" + cfg.HTTP.Addr + "/data",
|
||||
},
|
||||
"authprovider": map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user