Skip to content

Commit

Permalink
when no domain is passed in, use the base domain
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Nov 22, 2023
1 parent f694b6a commit 2bb12cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Events/UrlInvalidated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

namespace Statamic\Events;

use Statamic\StaticCaching\Cacher;

class UrlInvalidated extends Event
{
public $url;

public function __construct($url, $domain = null)
{
if (! $domain) {
$domain = app(Cacher::class)->getBaseUrl();
}

$this->url = $domain.$url;
}
}

0 comments on commit 2bb12cf

Please sign in to comment.