mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
httpd: add support for route undefined HEAD requests to GET handlers
HEAD responses will not include a body but the Content-Length will be set as the equivalent GET request Fixes #255
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
func initializeRouter(enableProfiler bool) {
|
||||
router = chi.NewRouter()
|
||||
|
||||
router.Use(middleware.GetHead)
|
||||
router.Use(middleware.Recoverer)
|
||||
|
||||
router.Group(func(r chi.Router) {
|
||||
|
||||
Reference in New Issue
Block a user