First Commit

This commit is contained in:
mark committed 2026-10-19 15:22:52 -07:00
1 parent 5eb9dd037d
commit 2e62c0e60b
11877 files changed
+2035312

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
<?php
if (!isset($_SESSION)) {
$sessionName = 'hotlunch';
session_name($sessionName);
if (!session_start()) {
exit();
}
}
if (!array_key_exists('csrf_token', $_SESSION)) {
$_SESSION['csrf_token'] = str_replace('+','.',base64_encode(openssl_random_pseudo_bytes(32)));
}
?>
$.ajaxSetup({
data: window.csrf,
cache: false,
headers: {
'X-CSRF-TOKEN': '<?php echo($_SESSION['csrf_token']); ?>'
}
});