mirror of
https://github.com/itflow-org/itflow
synced 2026-07-26 10:17:15 +00:00
Applied at all seven session_start sites. keepalive.php and guest_post.php had no cookie flags at all and now set httponly and secure too.
16 lines
419 B
PHP
16 lines
419 B
PHP
<?php
|
|
|
|
// Keep PHP sessions alive
|
|
// Receives requests via AJAX in the background every 8 mins to prevent PHP garbage collection ending sessions
|
|
// See footer.php & js/keepalive.js
|
|
|
|
require_once __DIR__ . "/config.php";
|
|
|
|
ini_set("session.cookie_httponly", true);
|
|
ini_set("session.cookie_samesite", "Lax");
|
|
if ($config_https_only) {
|
|
ini_set("session.cookie_secure", true);
|
|
}
|
|
session_start();
|
|
session_write_close();
|