summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-19 20:11:34 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-19 20:11:34 -0400
commit7ba9257a7ff659417501baf7358216555cebcd86 (patch)
treeffc842cec4165d1069220ae16e08a0b824952f4b /cmd/web.go
parent6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (diff)
downloadgitea-7ba9257a7ff659417501baf7358216555cebcd86.tar.gz
gitea-7ba9257a7ff659417501baf7358216555cebcd86.zip
Add suburl support
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index f56ae82685..45f35a35af 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -79,6 +79,7 @@ func newMacaron() *macaron.Macaron {
IndentJSON: macaron.Env != macaron.PROD,
}))
m.Use(i18n.I18n(i18n.Options{
+ SubURL: setting.AppSubUrl,
Langs: setting.Langs,
Names: setting.Names,
Redirect: true,
@@ -88,7 +89,9 @@ func newMacaron() *macaron.Macaron {
Interval: setting.CacheInternal,
Conn: setting.CacheConn,
}))
- m.Use(captcha.Captchaer())
+ m.Use(captcha.Captchaer(captcha.Options{
+ SubURL: setting.AppSubUrl,
+ }))
m.Use(session.Sessioner(session.Options{
Provider: setting.SessionProvider,
Config: *setting.SessionConfig,
@@ -365,7 +368,7 @@ func runWeb(*cli.Context) {
var err error
listenAddr := fmt.Sprintf("%s:%s", setting.HttpAddr, setting.HttpPort)
- log.Info("Listen: %v://%s", setting.Protocol, listenAddr)
+ log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubUrl)
switch setting.Protocol {
case setting.HTTP:
err = http.ListenAndServe(listenAddr, m)