mirror of
https://github.com/caddyserver/caddy.git
synced 2025-04-23 21:24:06 +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…
x
Reference in New Issue
Block a user