From 5cf5ba51bce5f378ca004627cc651f4d6d3e9d65 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 31 May 2023 22:32:25 +0200 Subject: [PATCH] go: enable HEAD method for some routes --- app/routes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/routes.go b/app/routes.go index 0a0650c..1dfd1ba 100644 --- a/app/routes.go +++ b/app/routes.go @@ -38,11 +38,13 @@ func (a *App) SetupRoutes() { // alternative: // e.GET("/static/*", echo.WrapHandler(http.StripPrefix("/static/", assets))) e.GET("/assets/*", echo.WrapHandler(http.StripPrefix("/assets/", assets)), handlers.MiddlewareCache) + e.HEAD("/assets/*", echo.WrapHandler(http.StripPrefix("/assets/", assets)), handlers.MiddlewareCache) e.GET("/healthz", handlers.Healthz()) e.GET("/health", handlers.Healthz()) e.GET("/", handlers.Index()) + e.HEAD("/", handlers.Index()) e.GET("/signin", handlers.Signin()) e.POST("/signin", handlers.SigninPost(a.db)) e.GET("/signup", handlers.Signup())