Skip to content

Commit 4f8105c

Browse files
authored
Handle SSR URLs with trailing slashes
1 parent 0259e37 commit 4f8105c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Ssr/HttpGateway.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Exception;
66
use Illuminate\Support\Facades\Http;
7+
use Illuminate\Support\Str;
78

89
class HttpGateway implements Gateway
910
{
@@ -16,7 +17,7 @@ public function dispatch(array $page): ?Response
1617
return null;
1718
}
1819

19-
$url = str_replace('/render', '', config('inertia.ssr.url', 'http://127.0.0.1:13714')).'/render';
20+
$url = str_replace('/render', '', Str::chopEnd(config('inertia.ssr.url', 'http://127.0.0.1:13714'), '/')).'/render';
2021

2122
try {
2223
$response = Http::post($url, $page)->throw()->json();

0 commit comments

Comments
 (0)