This commit is contained in:
kandrusyak
2023-07-25 00:51:02 +03:00
parent 70fc71051d
commit 2ab8622141
2 changed files with 9 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/golang-jwt/jwt/v5"
"github.com/labstack/echo-jwt/v4"
"github.com/labstack/echo/v4"
"net/http"
"strings"
)
@@ -15,6 +16,10 @@ var JWT_MW = echojwt.WithConfig(echojwt.Config{
if strings.Contains(c.Path(), "auth") || c.Path() == "/api/health" {
return true
}
if c.Request().Method == http.MethodOptions {
return true
}
return false
},
SuccessHandler: func(c echo.Context) {