Skip to content

Commit

Permalink
Update server.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mcansh authored Nov 12, 2024
1 parent d8ed64b commit 33f5522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/remix-fastify/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function createRemixHeaders(
export function getUrl<Server extends HttpServer>(
request: FastifyRequest<RouteGenericInterface, Server>,
): 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}`;
Expand Down

0 comments on commit 33f5522

Please sign in to comment.