fix(open-graph): update twitter:image URL to use real origin variable

- Changed the generation of the twitter:image meta tag to utilize the realOrigin variable instead of request.nextUrl.origin, ensuring accurate image URLs for Open Graph tags.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-06-11 01:49:55 +08:00
parent ed75af6f98
commit b035a9ed0a

View File

@@ -97,7 +97,7 @@ const createAndInsertOpenGraphMeta = (
'twitter:card': 'summary_large_image',
'twitter:title': photo.id,
'twitter:description': photo.description || '',
'twitter:image': `${request.nextUrl.origin}/og/${photo.id}`,
'twitter:image': `${realOrigin}/og/${photo.id}`,
}
for (const [name, content] of Object.entries(twitterTags)) {