Fix signed links behind the Strato release rewrite (base URL), mail redirect for test environments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 22:24:31 +02:00
1 parent fd744edf8c
commit 565eee4325
4 files changed
+18

No files matched your search

+7
View File
@@ -13,6 +13,13 @@
// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';
// Strato: the domain points at the deployment folder and .htaccess forwards to releases/<version>/public.
// The script then lives below that path, so the base URL would contain it and signed links would not
// match. The site is always served from the domain root, therefore the script is reported as /index.php.
if (preg_match('~/(releases/[^/]+|current)/public/index\.php$~', $_SERVER['SCRIPT_NAME'] ?? '')) {
$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = '/index.php';
}
// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';