asdasd
This commit is contained in:
@@ -1 +1 @@
|
|||||||
1.2.12
|
1.2.13
|
||||||
@@ -4870,9 +4870,22 @@ SQL;
|
|||||||
private function ensureDebugEnv(): void
|
private function ensureDebugEnv(): void
|
||||||
{
|
{
|
||||||
$env = strtolower((string)($this->conf['env'] ?? ''));
|
$env = strtolower((string)($this->conf['env'] ?? ''));
|
||||||
if ($env !== 'staging') {
|
if ($env === 'staging') {
|
||||||
$this->fail('Debug nur in Staging erlaubt', null, 403);
|
return;
|
||||||
}
|
}
|
||||||
|
$host = '';
|
||||||
|
if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
|
||||||
|
$host = strtolower(trim(explode(',', (string)$_SERVER['HTTP_X_FORWARDED_HOST'])[0]));
|
||||||
|
} elseif (!empty($_SERVER['HTTP_HOST'])) {
|
||||||
|
$host = strtolower((string)$_SERVER['HTTP_HOST']);
|
||||||
|
}
|
||||||
|
if ($host !== '') {
|
||||||
|
$host = preg_replace('/:\\d+$/', '', $host);
|
||||||
|
if ($host === 'staging.emailtemplate.it') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->fail('Debug nur in Staging erlaubt', null, 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function debugDir(): string
|
private function debugDir(): string
|
||||||
|
|||||||
Reference in New Issue
Block a user