summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2019-02-16 08:22:04 -0700
committerMatthew Holt <[email protected]>2019-02-16 08:22:04 -0700
commit33b00dc8b141e7c059a70e00b9e5827108e1aa83 (patch)
tree470a78c6244088fb6b848e6ac84d8b50353df8f6
parenteb9857137a10155fc8d584495ee9384841833cd8 (diff)
downloadcaddy-33b00dc8b141e7c059a70e00b9e5827108e1aa83.tar.gz
caddy-33b00dc8b141e7c059a70e00b9e5827108e1aa83.zip
staticfiles: HEAD, not OPTIONS
-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)