Skip to content

Commit

Permalink
leave relative urls alone
Browse files Browse the repository at this point in the history
Livewire generates URLs like '/livewire/update'. In this case we need to skip this check.
  • Loading branch information
anhofmann authored Jul 3, 2024
1 parent d59eeb8 commit 736e6ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UrlGeneratorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 736e6ae

Please sign in to comment.