fix configuration of mimetypes for the app registry

This commit is contained in:
Willy Kloucek
2022-08-18 11:55:19 +02:00
parent 5e166193ad
commit d93fd7ab4d
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()
}
}