aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd/web.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-29 16:29:17 +0800
committerGitHub <noreply@github.com>2020-02-29 16:29:17 +0800
commit17ae0ed3eef54d96bd179ff7fec0540cf3024748 (patch)
treea9111282717da16feb83baf352ffb2ee5178ca0d /internal/cmd/web.go
parentd59b0f6ff7ee24d94eaa5ad68173405faea6a81c (diff)
conf: overhaul settings (#5953)
* Overhaul cache settings * Overhaul HTTP settings * conf: overhaul more settings * log: make LGTM happy * travis: upload report to Codecov * Add codecov.yml
Diffstat (limited to 'internal/cmd/web.go')
-rw-r--r--internal/cmd/web.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/cmd/web.go b/internal/cmd/web.go
index 728d5c80..078678b4 100644
--- a/internal/cmd/web.go
+++ b/internal/cmd/web.go
@@ -92,14 +92,14 @@ func newMacaron() *macaron.Macaron {
))
m.Use(macaron.Static(
- conf.AvatarUploadPath,
+ conf.Picture.AvatarUploadPath,
macaron.StaticOptions{
Prefix: db.USER_AVATAR_URL_PREFIX,
SkipLogging: conf.Server.DisableRouterLog,
},
))
m.Use(macaron.Static(
- conf.RepositoryAvatarUploadPath,
+ conf.Picture.RepositoryAvatarUploadPath,
macaron.StaticOptions{
Prefix: db.REPO_AVATAR_URL_PREFIX,
SkipLogging: conf.Server.DisableRouterLog,
@@ -129,15 +129,15 @@ func newMacaron() *macaron.Macaron {
SubURL: conf.Server.Subpath,
Files: localeFiles,
CustomDirectory: filepath.Join(conf.CustomDir(), "conf", "locale"),
- Langs: conf.Langs,
- Names: conf.Names,
+ Langs: conf.I18n.Langs,
+ Names: conf.I18n.Names,
DefaultLang: "en-US",
Redirect: true,
}))
m.Use(cache.Cacher(cache.Options{
- Adapter: conf.CacheAdapter,
- AdapterConfig: conf.CacheConn,
- Interval: conf.CacheInterval,
+ Adapter: conf.Cache.Adapter,
+ AdapterConfig: conf.Cache.Host,
+ Interval: conf.Cache.Interval,
}))
m.Use(captcha.Captchaer(captcha.Options{
SubURL: conf.Server.Subpath,