From 33b00dc8b141e7c059a70e00b9e5827108e1aa83 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 16 Feb 2019 08:22:04 -0700 Subject: staticfiles: HEAD, not OPTIONS --- caddyhttp/staticfiles/fileserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyhttp/staticfiles/fileserver.go b/caddyhttp/staticfiles/fileserver.go index 00f032845..0863ebe58 100644 --- a/caddyhttp/staticfiles/fileserver.go +++ b/caddyhttp/staticfiles/fileserver.go @@ -53,7 +53,7 @@ type FileServer struct { // ServeHTTP serves static files for r according to fs's configuration. func (fs FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) { - if r.Method != "GET" && r.Method != "OPTIONS" { + if r.Method != "GET" && r.Method != "HEAD" { return http.StatusMethodNotAllowed, nil } return fs.serveFile(w, r) -- cgit v1.2.3