From cb5781ee29b7a53775612680cccf2b923064fcb1 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Mon, 17 Nov 2025 17:32:39 -0500 Subject: [PATCH] fix scrollbar styling in screenshots --- src/utils/getMicroLinkOgImage.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/getMicroLinkOgImage.ts b/src/utils/getMicroLinkOgImage.ts index c0b38592..f9386088 100644 --- a/src/utils/getMicroLinkOgImage.ts +++ b/src/utils/getMicroLinkOgImage.ts @@ -10,8 +10,12 @@ export async function getMicroLinkOgImage( }, ) { const headersList = await headers(); - const hostname = headersList.get("x-forwarded-host"); + let hostname = headersList.get("x-forwarded-host"); let protocol = headersList.get("x-forwarded-proto"); + if (process.env.NODE_ENV === "development") { + protocol === "https"; + hostname = "leaflet.pub"; + } let full_path = `${protocol}://${hostname}${path}`; return getWebpageImage(full_path, options); } @@ -38,7 +42,7 @@ export async function getWebpageImage( scrollPage: true, addStyleTag: [ { - content: `* {overflow: hidden !important; }`, + content: `* {scrollbar-width:none; }`, }, ], gotoOptions: { -- 2.51.2