fix cors
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user