diff --git a/README.md b/README.md index b115978..52533ab 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Features * In response to a `PUT` or `POST` request, performs a shallow in-memory clone of a git repository, checks out a tree to the filesystem, and atomically updates the version of content being served. - `PUT` method is a custom REST endpoint, `POST` method is a Forgejo webhook endpoint. -* In response to a `GET` request, selects an appropriate tree and serves files from it. Supported URL patterns: +* In response to a `GET` or `HEAD` request, selects an appropriate tree and serves files from it. Supported URL patterns: - `https://domain.tld/project/` (routed to project-specific tree) - `https://domain.tld/` (routed to domain-specific tree by exclusion) diff --git a/src/pages.go b/src/pages.go index 784fed5..2ae4ed6 100644 --- a/src/pages.go +++ b/src/pages.go @@ -237,7 +237,7 @@ func ServePages(w http.ResponseWriter, r *http.Request) { log.Println("pages:", r.Method, r.Host, r.URL) err := error(nil) switch r.Method { - case http.MethodGet: + case http.MethodGet, http.MethodHead: err = getPage(w, r) case http.MethodPut: err = putPage(w, r)