aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-03-06 01:21:13 -0500
committerUnknwon <u@gogs.io>2018-03-06 01:21:13 -0500
commit4a669f54789ca49b1c0cb2fbc5f6819d1db40054 (patch)
tree0527d17bac16ce84927a0e2f5234a26c7a98258b
parentade8aab43f11b2c2e2e61133357094fa089395e1 (diff)
web: support HTTP HEAD requests (#2857)
-rw-r--r--cmd/web.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index e7c15bbf..bdbb9c6e 100644
--- a/cmd/web.go
+++ b/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.