diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-11-24 18:47:59 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-11-24 18:47:59 -0500 |
commit | 54d25c13d7a5f52d44680626c45d84d0193091a0 (patch) | |
tree | 3593e299188000c2a0bcea1932512095f8a429a7 /modules/setting | |
parent | 23d53561d110620ef7e656d2fedfe17708876957 (diff) | |
download | gitea-54d25c13d7a5f52d44680626c45d84d0193091a0.tar.gz gitea-54d25c13d7a5f52d44680626c45d84d0193091a0.zip |
Fix #543
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index cf34c2edc6..a775847c1f 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -31,6 +31,13 @@ const ( FCGI Scheme = "fcgi" ) +type LandingPage string + +const ( + LANDING_PAGE_HOME LandingPage = "/" + LANDING_PAGE_EXPLORE LandingPage = "/explore" +) + var ( // App settings. AppVer string @@ -48,6 +55,7 @@ var ( CertFile, KeyFile string StaticRootPath string EnableGzip bool + LandingPageUrl LandingPage // Security settings. InstallLock bool @@ -197,6 +205,13 @@ func NewConfigContext() { LogRootPath = Cfg.MustValue("log", "ROOT_PATH", path.Join(workDir, "log")) EnableGzip = Cfg.MustBool("server", "ENABLE_GZIP") + switch Cfg.MustValue("server", "LANDING_PAGE", "home") { + case "explore": + LandingPageUrl = LANDING_PAGE_EXPLORE + default: + LandingPageUrl = LANDING_PAGE_HOME + } + InstallLock = Cfg.MustBool("security", "INSTALL_LOCK") SecretKey = Cfg.MustValue("security", "SECRET_KEY") LogInRememberDays = Cfg.MustInt("security", "LOGIN_REMEMBER_DAYS") |