diff options
-rw-r--r-- | caddyhttp/staticfiles/fileserver.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) |