diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-11-30 14:35:06 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-11-30 14:37:23 +0300 |
commit | d13acbb585182980c0fcdba72df26001fafbce38 (patch) | |
tree | cd8650cb0e69fe633beb91ff6dbb2be114df38f5 /app.go | |
parent | 14e61effff77b6dde9effc665a13c82bec509067 (diff) |
Remove default config
Add todo to reconfigure other vfs
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -506,12 +506,18 @@ func runApp(config appConfig) { log.WithError(err).Warn("Loading extended MIME database failed") } - cfg.Default.Zip.ExpirationInterval = config.ZipCacheExpiry - cfg.Default.Zip.CleanupInterval = config.ZipCacheCleanup - cfg.Default.Zip.RefreshInterval = config.ZipCacheRefresh - cfg.Default.Zip.OpenTimeout = config.ZipeOpenTimeout + c := &cfg.Config{ + Zip: &cfg.ZipServing{ + ExpirationInterval: config.ZipCacheExpiry, + CleanupInterval: config.ZipCacheCleanup, + RefreshInterval: config.ZipCacheRefresh, + OpenTimeout: config.ZipeOpenTimeout, + }, + } - if err := zip.Instance().Reconfigure(cfg.Default); err != nil { + // TODO: reconfigure all VFS' + // https://gitlab.com/gitlab-org/gitlab-pages/-/issues/512 + if err := zip.Instance().Reconfigure(c); err != nil { fatal(err, "failed to reconfigure zip VFS") } |