1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 06:58:51 +03:00

orchestration beginning

This commit is contained in:
Anton Afanasyeu
2026-05-30 17:55:36 +02:00
parent 95f521c4a0
commit a9a9590698
31 changed files with 1238 additions and 27 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
/**
* Shared session for all Android Cast web consoles (crashes, build, …).
* Same cookie path + session name => one login across sub-apps.
*/
function platform_start_session(string $sessionName = 'ac_crash_sess', string $cookiePath = '/app/androidcast_project'): void
{
if (session_status() === PHP_SESSION_ACTIVE) {
return;
}
session_name($sessionName);
session_set_cookie_params([
'lifetime' => 0,
'path' => $cookiePath,
'httponly' => true,
'samesite' => 'Lax',
'secure' => (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'),
]);
session_start();
}