Explorar o código

use AppSubUrl as prefix for routes in FCGI mode

Kyle P Davis %!s(int64=10) %!d(string=hai) anos
pai
achega
47f37e55e9
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      cmd/web.go

+ 3 - 0
cmd/web.go

@@ -85,6 +85,9 @@ func newMacaron() *macaron.Macaron {
 	if setting.EnableGzip {
 		m.Use(macaron.Gziper())
 	}
+	if setting.Protocol == setting.FCGI {
+		m.SetURLPrefix(setting.AppSubUrl)
+	}
 	m.Use(macaron.Static(
 		path.Join(setting.StaticRootPath, "public"),
 		macaron.StaticOptions{