fix: update code

This commit is contained in:
2025-09-02 20:38:58 +02:00
parent 7db9ce4d17
commit a3f5b5a0cf
8 changed files with 60 additions and 63 deletions

View File

@ -27,7 +27,7 @@ $container = $config[$host] ?? null;
$lxd = new LxdService();
// === Helper URLs ===
$redirectBase = parseUrl("$host/app?auth=ok&redirect=" . urlencode(getFullUrl()));
$redirectBase = parseUrl("$host/app");
$waitingPage = parseUrl("$host/app/waiting?name=$container&redirect=" . urlencode(getFullUrl()));
// === If container is missing or invalid ===
if (!$container || !$lxd->containerExists($container)) {
@ -71,7 +71,8 @@ function proxy(string $name, string $targetUrl): void {
$_SERVER['HTTP_PROXY_TARGET_URL'] = $targetUrl;
$responseCode = Proxy::run();
writeLog($name, $targetUrl);
touch($_ENV['STATEDIR']."/".$name);
}
function getFullUrl(): string {