From 736e6aea29c9f8c94e088286c46b203d10b9155c Mon Sep 17 00:00:00 2001 From: Ansgar Hofmann Date: Wed, 3 Jul 2024 08:21:52 +0200 Subject: [PATCH] leave relative urls alone Livewire generates URLs like '/livewire/update'. In this case we need to skip this check. --- src/UrlGeneratorService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UrlGeneratorService.php b/src/UrlGeneratorService.php index 06464ee..d0fee81 100644 --- a/src/UrlGeneratorService.php +++ b/src/UrlGeneratorService.php @@ -14,7 +14,8 @@ private function addSid(string $url, ?\Illuminate\Routing\Route $route = null): } // Don't expose sessionID to other Domains - if(parse_url($url, PHP_URL_HOST) != parse_url(\Config::get('app.url'), PHP_URL_HOST)) { + $host = parse_url($url, PHP_URL_HOST); + if($host && $host != parse_url(\Config::get('app.url'), PHP_URL_HOST)) { return $url; }