This commit is contained in:
2025-11-26 11:31:09 +08:00
parent dd38813636
commit 7c87114b30
9 changed files with 65 additions and 46 deletions
-8
View File
@@ -18,7 +18,6 @@ import (
"authentication/redisclient"
"github.com/golang-jwt/jwt/v5"
"github.com/joho/godotenv"
)
var (
@@ -26,13 +25,6 @@ var (
Mu sync.Mutex
)
func init() {
err := godotenv.Load()
if err != nil {
helper.LogWarn("Warning: Could not load .env file, using system environment variables.")
}
}
func JWTMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
authHeader := r.Header.Get("Authorization")