request instanceof Http && $this->hasTunnelStore($this->request)) { return [false]; } return null; } /** * If tunnel store indicator is present, treat URL as valid (skip redirect). * * @param BaseUrlChecker $subject * @param callable $proceed * @param array $uri * @param Http $request * @return bool */ public function aroundExecute(BaseUrlChecker $subject, callable $proceed, $uri, $request): bool { if ($request instanceof Http && $this->hasTunnelStore($request)) { return true; } return $proceed($uri, $request); } private function hasTunnelStore(Http $request): bool { if ($this->tunnelRequestDetector->getTunnelStoreCode($request) !== null) { return true; } return $this->hasTunnelStoreFromSuperglobals(); } private function hasTunnelStoreFromSuperglobals(): bool { if (!empty($_GET[self::QUERY_PARAM_STORE]) && trim((string) $_GET[self::QUERY_PARAM_STORE]) !== '') { return true; } $uri = $_SERVER['REQUEST_URI'] ?? ''; if ($uri !== '' && str_contains($uri, self::QUERY_PARAM_STORE . '=')) { return true; } $h = $_SERVER[self::SERVER_HEADER] ?? ''; return $h !== '' && trim((string) $h) !== ''; } }