Merge pull request #4411 from wkloucek/fix-app-registry-default-mimetypes

fix configuration of mimetypes for the app registry
This commit is contained in:
Martin
2022-08-20 09:58:32 +02:00
committed by GitHub
3 changed files with 12 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
Bugfix: Fix configuration of mimetypes for the app registry
We've fixed the configuration option for mimetypes in the app registry.
Previously the default config would always be merged over the user provided
configuration. Now the default mimetype configuration is only used if the user does not
providy any mimetype configuration (like it is already done in the proxy with the routes configuration).
https://github.com/owncloud/ocis/pull/4411

View File

@@ -30,9 +30,6 @@ func DefaultConfig() *config.Config {
Reva: &config.Reva{
Address: "127.0.0.1:9142",
},
AppRegistry: config.AppRegistry{
MimeTypeConfig: defaultMimeTypeConfig(),
},
}
}
@@ -150,6 +147,9 @@ func EnsureDefaults(cfg *config.Config) {
}
// Sanitize the config
func Sanitize(cfg *config.Config) {
// nothing to sanitize here atm
if cfg.AppRegistry.MimeTypeConfig == nil {
cfg.AppRegistry.MimeTypeConfig = defaultMimeTypeConfig()
}
}