weitere Bearibeitung

This commit is contained in:
2026-06-17 16:45:14 +02:00
parent 06645f1e9c
commit 1891ec0a51
38 changed files with 2720 additions and 109 deletions
+9
View File
@@ -6,6 +6,15 @@ final class Response
{
public static function redirect(string $url): never
{
if (str_starts_with($url, '/') && function_exists('url')) {
$url = \url($url);
} else {
$prefix = $_SERVER['KAFFEEKASSE_PROXY_PREFIX'] ?? '';
if ($prefix !== '' && str_starts_with($url, '/') && !str_starts_with($url, $prefix)) {
$url = $prefix . $url;
}
}
header('Location: ' . $url);
exit;
}