mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
staticfiles: Re-allow HEAD requests
This commit is contained in:
parent
c1d6c928e3
commit
eb9857137a
|
@ -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" {
|
||||
if r.Method != "GET" && r.Method != "OPTIONS" {
|
||||
return http.StatusMethodNotAllowed, nil
|
||||
}
|
||||
return fs.serveFile(w, r)
|
||||
|
|
Loading…
Reference in New Issue
Block a user