diff --git a/keyserver/src/responders/landing-handler.js b/keyserver/src/responders/landing-handler.js --- a/keyserver/src/responders/landing-handler.js +++ b/keyserver/src/responders/landing-handler.js @@ -9,10 +9,7 @@ import { type LandingSSRProps } from '../landing/landing-ssr.react'; import { waitForStream } from '../utils/json-stream'; -import { - getAndAssertLandingURLFacts, - clientPathFromRouterPath, -} from '../utils/urls'; +import { getAndAssertLandingURLFacts } from '../utils/urls'; import { getMessageForException } from './utils'; async function landingHandler(req: $Request, res: $Response) { @@ -160,7 +157,7 @@ // We remove trailing slash for `react-router` const routerBasename = basePath.replace(/\/$/, ''); - const clientPath = clientPathFromRouterPath(req.url, urlFacts); + const clientPath = routerBasename + req.url; const reactStream = renderToNodeStream( , ); diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js --- a/keyserver/src/responders/website-responders.js +++ b/keyserver/src/responders/website-responders.js @@ -46,10 +46,7 @@ import { setNewSession } from '../session/cookies'; import { Viewer } from '../session/viewer'; import { streamJSON, waitForStream } from '../utils/json-stream'; -import { - getAppURLFactsFromRequestURL, - clientPathFromRouterPath, -} from '../utils/urls'; +import { getAppURLFactsFromRequestURL } from '../utils/urls'; const { renderToNodeStream } = ReactDOMServer; @@ -353,7 +350,7 @@ const store: Store = createStore(reducer, state); const routerContext = {}; - const clientPath = clientPathFromRouterPath(req.url, appURLFacts); + const clientPath = baseURL + req.url; const reactStream = renderToNodeStream(