correction de bug formulaire de contact
This commit is contained in:
parent
c14f0531ff
commit
d705c47fbc
8 changed files with 379 additions and 665 deletions
|
|
@ -15,7 +15,7 @@ const ALLOWED_ORIGIN = '*'; // ou 'https://omegakube.com
|
|||
|
||||
/* ── Anti-spam : limite par IP (optionnel, nécessite accès fichier) ── */
|
||||
const RATE_LIMIT_ENABLED = true;
|
||||
const RATE_LIMIT_MAX = 30; // max envois
|
||||
const RATE_LIMIT_MAX = 3; // max envois
|
||||
const RATE_LIMIT_WINDOW = 3600; // par heure (secondes)
|
||||
const RATE_LIMIT_DIR = __DIR__ . '/.rate_limits/';
|
||||
|
||||
|
|
@ -180,8 +180,8 @@ $emailBodyHtml = '<!DOCTYPE html>
|
|||
/* Boundary pour email multipart */
|
||||
$boundary = '----=_Part_' . md5(uniqid('', true));
|
||||
|
||||
$headers = "From: =?UTF-8?B?" . base64_encode($name) . "?= <{$email}>\r\n";
|
||||
$headers .= "Reply-To: {$email}\r\n";
|
||||
$headers = "From: " . RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">\r\n";
|
||||
$headers .= "Reply-To: =?UTF-8?B?" . base64_encode($name) . "?= <{$email}>\r\n";
|
||||
$headers .= "To: " . RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">\r\n";
|
||||
$headers .= "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-Type: multipart/alternative; boundary=\"{$boundary}\"\r\n";
|
||||
|
|
@ -226,4 +226,4 @@ if ($sent) {
|
|||
} else {
|
||||
http_response_code(500);
|
||||
echo json_encode(['success' => false, 'message' => 'Une erreur est survenue lors de l\'envoi. Veuillez réessayer ou nous contacter directement par Discord.']);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue