Handle HEAD requests with static router

This commit is contained in:
2025-10-23 20:26:34 +02:00
parent f9ce8b9e9f
commit 9a232819a8

View File

@@ -152,7 +152,9 @@ func setupRouter(o Options) *chi.Mux {
}) })
// Handle all other routes with static file server // Handle all other routes with static file server
r.Get("/*", handlers.NewStaticHandler(o.Config.StaticPath).ServeHTTP) staticHandler := handlers.NewStaticHandler(o.Config.StaticPath)
r.Get("/*", staticHandler.ServeHTTP)
r.Head("/*", staticHandler.ServeHTTP)
return r return r
} }