瀏覽代碼

web: support HTTP HEAD requests (#2857)

Unknwon 7 年之前
父節點
當前提交
4a669f5478
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      cmd/web.go

+ 2 - 0
cmd/web.go

@@ -172,6 +172,8 @@ func runWeb(c *cli.Context) error {
 
 	bindIgnErr := binding.BindIgnErr
 
+	m.SetAutoHead(true)
+
 	// FIXME: not all routes need go through same middlewares.
 	// Especially some AJAX requests, we can reduce middleware number to improve performance.
 	// Routers.