summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--caddyhttp/staticfiles/fileserver.go2
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)