mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-21 13:09:10 -06:00
Merge pull request #4411 from wkloucek/fix-app-registry-default-mimetypes
fix configuration of mimetypes for the app registry
This commit is contained in:
@@ -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
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user