From 6411dd9fb4de23f356fd3ffbb42089f3a21706e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 27 Jun 2024 08:24:12 +0000 Subject: [PATCH 1/2] Mark domain as traefik --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 5372945d70..19215e23ee 100644 --- a/.env +++ b/.env @@ -17,7 +17,7 @@ _APP_OPTIONS_ROUTER_PROTECTION=disabled _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key -_APP_DOMAIN=localhost +_APP_DOMAIN=traefik _APP_DOMAIN_FUNCTIONS=functions.localhost _APP_DOMAIN_TARGET=localhost _APP_REDIS_HOST=redis From b041db06589646604a1c0b32cbd3cdbe9e75516f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 27 Jun 2024 10:17:01 +0000 Subject: [PATCH 2/2] Fix tests --- app/controllers/general.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 92ddec58f5..dbfd3bae7d 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -901,7 +901,7 @@ App::get('/robots.txt') $host = $request->getHostname() ?? ''; $mainDomain = System::getEnv('_APP_DOMAIN', ''); - if ($host === $mainDomain) { + if ($host === $mainDomain || $host === 'localhost') { $template = new View(__DIR__ . '/../views/general/robots.phtml'); $response->text($template->render(false)); } else { @@ -926,7 +926,7 @@ App::get('/humans.txt') $host = $request->getHostname() ?? ''; $mainDomain = System::getEnv('_APP_DOMAIN', ''); - if ($host === $mainDomain) { + if ($host === $mainDomain || $host === 'localhost') { $template = new View(__DIR__ . '/../views/general/humans.phtml'); $response->text($template->render(false)); } else {