diff --git a/packages/runtime/src/runServerApp.tsx b/packages/runtime/src/runServerApp.tsx index d6f0b36107..cc69ccb214 100644 --- a/packages/runtime/src/runServerApp.tsx +++ b/packages/runtime/src/runServerApp.tsx @@ -491,7 +491,7 @@ function renderDocument(options: RenderDocumentOptions): Response { /** * ref: https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/server.tsx */ -const REGEXP_WITH_HOSTNAME = /^https?:\/\/[^\/]+/i; +const REGEXP_WITH_HOSTNAME = /^https?:\/\/[^/]+/i; function getLocation(url: string) { // In case of invalid URL, provide a default base url. const locationPath = url.replace(REGEXP_WITH_HOSTNAME, '') || '/';