瀏覽代碼

Merge pull request #628 from KylePDavis/use_url_prefix_for_fcgi

Use AppSubUrl as prefix for routes in FCGI mode
无闻 10 年之前
父節點
當前提交
4c770b87c5
共有 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{