diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-22 14:07:46 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-22 14:07:46 +0200 |
| commit | c2f805c17713bc60a9cc8a353cf393226395ca46 (patch) | |
| tree | cdaf815f617bd38dd5351e3feb46d4947362cf62 /static/api/contact.php | |
| parent | b97022c6fd5351215adabfa90ef9c5c191ad8b7c (diff) | |
| download | danixxyz-c2f805c17713bc60a9cc8a353cf393226395ca46.tar.gz danixxyz-c2f805c17713bc60a9cc8a353cf393226395ca46.zip | |
Update: modified mail form backend for danix.xyz and added vendor folderrelease_22042026-1408
Diffstat (limited to 'static/api/contact.php')
| -rw-r--r-- | static/api/contact.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/static/api/contact.php b/static/api/contact.php index 4689b99..d8f2239 100644 --- a/static/api/contact.php +++ b/static/api/contact.php @@ -1,6 +1,6 @@ <?php /** - * Contact form handler for danix.me + * Contact form handler for danix.xyz * * Spam protection: * 1. Honeypot field — bots fill it, humans don't see it @@ -19,10 +19,10 @@ header('Cache-Control: no-store'); // Credentials are read from server environment variables — never hardcoded here. // Set them in your nginx fastcgi_param, Apache SetEnv, or hosting panel. const SENDER_DOMAIN = 'danix.xyz'; // used in From name and subject prefix -const ALLOWED_ORIGIN = 'https://danix.me'; // CSRF: only accept from this origin +const ALLOWED_ORIGIN = 'https://danix.xyz'; // CSRF: only accept from this origin const MIN_ELAPSED = 4; // seconds before submission is accepted const RATE_WINDOW = 300; // seconds between allowed submissions per IP -const RATE_DIR = '/var/lib/danixme/cf_rate'; // owned by www-data:www-data, mode 0700 +const RATE_DIR = '/var/lib/danixxyz/cf_rate'; // owned by www-data:www-data, mode 0700 // $cfg = [ // 'recipient' => getenv('MAIL_RECIPIENT') ?: '', @@ -117,7 +117,7 @@ use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception as MailerException; -$subjectLine = '[contact from danix.me] - ' . ($subject !== '' ? $subject : 'New message from ' . $name); +$subjectLine = '[contact from danix.xyz] - ' . ($subject !== '' ? $subject : 'New message from ' . $name); $body = implode("\n", [ 'Name: ' . $name, |
