From f2c263c54facdcbc9375a47535c0389fd7d05875 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 25 Aug 2014 09:45:39 +0800 Subject: fix #367 --- modules/setting/setting.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 0cf1a78930..deb1651895 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -156,7 +156,10 @@ func NewConfigContext() { AppName = Cfg.MustValue("", "APP_NAME", "Gogs: Go Git Service") AppLogo = Cfg.MustValue("", "APP_LOGO", "img/favicon.png") - AppUrl = Cfg.MustValue("server", "ROOT_URL", "http://localhost:3000") + AppUrl = Cfg.MustValue("server", "ROOT_URL", "http://localhost:3000/") + if AppUrl[len(AppUrl)-1] != '/' { + AppUrl += "/" + } Protocol = HTTP if Cfg.MustValue("server", "PROTOCOL") == "https" { -- cgit v1.2.3