If you need help solving this exception, you can have a look at the TYPO3 Documentation. There you can find solutions provided by the TYPO3 community. Once you have found a solution to the problem, help others by contributing to the documentation page.
Find a solution for this exception in the TYPO3 Documentation.
$retVal = $host; } } if (!static::isAllowedHostHeaderValue($retVal)) { throw new \UnexpectedValueException( 'The current host header value does not match the configured trusted hosts pattern! Check the pattern defined in $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'trustedHostsPattern\'] and adapt it, if you want to allow the current host header \'' . $retVal . '\' for your installation.', 1396795884 ); }
$httpHostOnly = self::getIndpEnv('TYPO3_HOST_ONLY'); $retVal = strlen($httpHost) > strlen($httpHostOnly) ? substr($httpHost, strlen($httpHostOnly) + 1) : ''; break; case 'TYPO3_REQUEST_HOST': $retVal = (self::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://') . self::getIndpEnv('HTTP_HOST'); break; case 'TYPO3_REQUEST_URL': $retVal = self::getIndpEnv('TYPO3_REQUEST_HOST') . self::getIndpEnv('REQUEST_URI'); break;
case 'TYPO3_REQUEST_HOST': $retVal = (self::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://') . self::getIndpEnv('HTTP_HOST'); break; case 'TYPO3_REQUEST_URL': $retVal = self::getIndpEnv('TYPO3_REQUEST_HOST') . self::getIndpEnv('REQUEST_URI'); break; case 'TYPO3_REQUEST_SCRIPT': $retVal = self::getIndpEnv('TYPO3_REQUEST_HOST') . self::getIndpEnv('SCRIPT_NAME'); break;
$serverParameters = $_SERVER; $headers = static::prepareHeaders($serverParameters); $method = $serverParameters['REQUEST_METHOD'] ?? 'GET'; $uri = new Uri(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')); $request = new ServerRequest( $uri, $method,
final public function run(callable $execute = null) { try { $response = $this->handle( ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
// Set up the application for the frontend call_user_func(function () { $classLoader = require dirname(__DIR__).'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });
call_user_func(function () { $classLoader = require dirname(__DIR__).'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });