2 Commits

Author SHA1 Message Date
c11d956ced Merge pull request #66 from lordmathis/fix/head-request
Handle HEAD requests with static router
2025-10-23 20:35:47 +02:00
9a232819a8 Handle HEAD requests with static router 2025-10-23 20:26:34 +02:00

View File

@@ -152,7 +152,9 @@ func setupRouter(o Options) *chi.Mux {
})
// 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
}