From 197ea414423ab0d91cfec163af49108bb24d6ddc Mon Sep 17 00:00:00 2001 From: bytedream Date: Sat, 31 Oct 2026 01:54:29 +0100 Subject: [PATCH] fix invalid opengraph stream url --- src/pages/video/[name].astro | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/video/[name].astro b/src/pages/video/[name].astro index 3f112bb..18e67d6 100644 --- a/src/pages/video/[name].astro +++ b/src/pages/video/[name].astro @@ -14,14 +14,13 @@ if (!metadata) return new Response(null, { status: 404 }); const { title, description, width, height, duration } = metadata; const basePath = import.meta.env.BASE_URL.replace(/\/$/, ''); const streamPath = `${basePath}/video/${encodeURIComponent(video.name)}/stream`; -const streamUrl = new URL(streamPath, Astro.url); --- - - {streamUrl.href.startsWith('https://') && } + + {streamPath.startsWith('https://') && } {width && } {height && }