From 4f8105c42aebe909289456d1cc1a45855a8ced3f Mon Sep 17 00:00:00 2001 From: simon-tma Date: Mon, 13 Jan 2025 15:38:53 +1100 Subject: [PATCH] Handle SSR URLs with trailing slashes --- src/Ssr/HttpGateway.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ssr/HttpGateway.php b/src/Ssr/HttpGateway.php index 62b92717..f6e0427d 100644 --- a/src/Ssr/HttpGateway.php +++ b/src/Ssr/HttpGateway.php @@ -4,6 +4,7 @@ use Exception; use Illuminate\Support\Facades\Http; +use Illuminate\Support\Str; class HttpGateway implements Gateway { @@ -16,7 +17,7 @@ public function dispatch(array $page): ?Response return null; } - $url = str_replace('/render', '', config('inertia.ssr.url', 'http://127.0.0.1:13714')).'/render'; + $url = str_replace('/render', '', Str::chopEnd(config('inertia.ssr.url', 'http://127.0.0.1:13714'), '/')).'/render'; try { $response = Http::post($url, $page)->throw()->json();