From 2bb12cfea3ed4d8adde2db40eee57c67f13e5b01 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Wed, 22 Nov 2023 11:18:36 -0500 Subject: [PATCH] when no domain is passed in, use the base domain --- src/Events/UrlInvalidated.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Events/UrlInvalidated.php b/src/Events/UrlInvalidated.php index 5b65f80997..39f73859cf 100644 --- a/src/Events/UrlInvalidated.php +++ b/src/Events/UrlInvalidated.php @@ -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; } }