From a70aac85e71bcb4aa27a7f4fc49f694fbc8b9603 Mon Sep 17 00:00:00 2001 From: Andrey Chervyakov Date: Sat, 13 Mar 2021 18:10:53 +0600 Subject: [PATCH] Secure all links endpoint --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 6c28842..e668866 100644 --- a/server.go +++ b/server.go @@ -22,7 +22,7 @@ func addMiddleware(s *echo.Echo, conf *koanf.Koanf) { s.Use(middleware.JWTWithConfig(middleware.JWTConfig{ Skipper: func(ctx echo.Context) bool { - return ctx.Request().Method == "GET" + return ctx.Request().Method == "GET" && ctx.Request().URL.Path != "/links" }, SigningMethod: conf.String("jwt.method"), SigningKey: conf.Bytes("jwt.key"),