mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-22 16:46:53 +01:00
staticfiles: HEAD, not OPTIONS
This commit is contained in:
parent
eb9857137a
commit
33b00dc8b1
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue