Преглед на файлове

use AppSubUrl as prefix for routes in FCGI mode

Kyle P Davis преди 10 години
родител
ревизия
47f37e55e9
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  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{