Added resend, fixed CSRF

This commit is contained in:
cdricms
2025-02-21 16:16:24 +01:00
parent dbddf12f25
commit de828d4c13
10 changed files with 86 additions and 76 deletions

View File

@@ -13,6 +13,13 @@ import (
"fr.latosa-escrima/utils"
"github.com/golang-jwt/jwt/v5"
"github.com/google/uuid"
"github.com/gorilla/csrf"
)
var CSRFMiddleware core.Middleware = csrf.Protect(
core.CSRF_KEY,
csrf.Secure(os.Getenv("ENVIRONMENT") != "DEV"),
csrf.HttpOnly(true),
)
func CORS(next http.Handler) http.Handler {