diff --git a/api/og-story.js b/api/og-story.js index 196c46bb9..8140268ff 100644 --- a/api/og-story.js +++ b/api/og-story.js @@ -31,7 +31,7 @@ function normalizeLevel(rawLevel) { } export default function handler(req, res) { - const url = new URL(req.url, `https://${req.headers.host}`); + const url = new URL(req.url, 'https://worldmonitor.app'); const countryCode = (url.searchParams.get('c') || '').toUpperCase(); const type = url.searchParams.get('t') || 'ciianalysis'; const score = url.searchParams.get('s'); diff --git a/api/story.js b/api/story.js index 6986cef32..422881f65 100644 --- a/api/story.js +++ b/api/story.js @@ -16,7 +16,7 @@ const COUNTRY_NAMES = { const BOT_UA = /twitterbot|facebookexternalhit|linkedinbot|slackbot|telegrambot|whatsapp|discordbot|redditbot|googlebot/i; export default function handler(req, res) { - const url = new URL(req.url, `https://${req.headers.host}`); + const url = new URL(req.url, 'https://worldmonitor.app'); const countryCode = (url.searchParams.get('c') || '').toUpperCase(); const type = url.searchParams.get('t') || 'ciianalysis'; const ts = url.searchParams.get('ts') || ''; @@ -26,7 +26,7 @@ export default function handler(req, res) { const ua = req.headers['user-agent'] || ''; const isBot = BOT_UA.test(ua); - const baseUrl = `https://${req.headers.host}`; + const baseUrl = 'https://worldmonitor.app'; const spaUrl = `${baseUrl}/?c=${countryCode}&t=${type}${ts ? `&ts=${ts}` : ''}`; // Real users → redirect to SPA