diff --git a/packages/remix-fastify/src/server.ts b/packages/remix-fastify/src/server.ts index ca4bf602..50a4e98e 100644 --- a/packages/remix-fastify/src/server.ts +++ b/packages/remix-fastify/src/server.ts @@ -88,7 +88,7 @@ export function createRemixHeaders( export function getUrl( request: FastifyRequest, ): string { - let host = "host" in request ? request.host : request.hostname; + let host = request.host ?? request.hostname; let origin = `${request.protocol}://${host}`; // Use `request.originalUrl` so Remix is aware of the full path let url = `${origin}${request.originalUrl}`;