From ba96147f7b2fe28f40df7ffe0a8bce322337226a Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Thu, 1 Oct 2026 15:14:13 +0200 Subject: [PATCH] Use the real host for SERVER_NAME in the TYPO3 driver The TYPO3 driver hardcoded $_SERVER['SERVER_NAME'] = $siteName.'.dev', a stale default from when Valet's TLD was .dev (changed to .test in 2018). For a site served at foo.test the app saw SERVER_NAME 'foo.dev'. Set it from the actual request host instead, matching every other driver (Basic, Magento2, Kirby, Craft, ...). --- cli/Valet/Drivers/Specific/Typo3ValetDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/Valet/Drivers/Specific/Typo3ValetDriver.php b/cli/Valet/Drivers/Specific/Typo3ValetDriver.php index 6bb3a14..8dd2080 100644 --- a/cli/Valet/Drivers/Specific/Typo3ValetDriver.php +++ b/cli/Valet/Drivers/Specific/Typo3ValetDriver.php @@ -49,7 +49,7 @@ public function beforeLoading(string $sitePath, string $siteName, string $uri): // without modifying the URI, redirect if necessary $this->handleRedirectBackendShorthandUris($uri); - $_SERVER['SERVER_NAME'] = $siteName.'.dev'; + $_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST']; $_SERVER['DOCUMENT_URI'] = $uri; $_SERVER['SCRIPT_NAME'] = $uri; $_SERVER['PHP_SELF'] = $uri;