First commit

This commit is contained in:
corrado.mulas
2024-11-20 02:37:15 +01:00
parent 3ed2e3560c
commit 3a9065d37e

View File

@@ -4,11 +4,13 @@ import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
)
func validateRecaptcha(token string) (bool, error) {
log.Printf("Validating Turnstile token: %s", token)
secret := os.Getenv("TURNSTILE_SECRET_KEY")
if secret == "" {
return false, fmt.Errorf("TURNSTILE_SECRET_KEY is not set")