Skip to content

Commit

Permalink
staticfiles: HEAD, not OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Feb 16, 2019
1 parent eb98571 commit 33b00dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caddyhttp/staticfiles/fileserver.go
Expand Up @@ -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)
Expand Down

0 comments on commit 33b00dc

Please sign in to comment.