Stripped from the internal repo: per-box deploy trees, Go services (nodelist/astmeta/proxy/svxdr), deploy/sync scripts and all secrets. Config templates for nginx, PHP-FPM, Redis and tmpfiles live in install/ with CHANGEME placeholders. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
21 lines
514 B
PHP
21 lines
514 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
require __DIR__ . '/lib.php';
|
|
|
|
$j = json_in();
|
|
$consent = (string)($j['consent'] ?? '');
|
|
if ($consent !== 'necessary' && $consent !== 'all') {
|
|
json_out(['ok'=>false,'error'=>'bad_consent'], 400);
|
|
}
|
|
|
|
$maxAge = 60 * 60 * 24 * 365;
|
|
setcookie('cookie_consent', $consent, [
|
|
'expires' => time() + $maxAge,
|
|
'path' => '/',
|
|
'secure' => (bool)(cfg()['session']['cookie_secure'] ?? false),
|
|
'httponly' => false,
|
|
'samesite' => 'Lax',
|
|
]);
|
|
|
|
json_out(['ok'=>true, 'consent'=>$consent]);
|