diff --git a/server/routes.ts b/server/routes.ts index 5987ce8..583942b 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -272,6 +272,120 @@ export async function registerRoutes(app: Express): Promise { }); }); + // Server-side meta tags for /player page (crawlers + SEO) + app.get('/player', (req, res, next) => { + const userAgent = req.headers['user-agent']?.toLowerCase() || ''; + + const crawlers = [ + 'facebookexternalhit', 'facebot', 'twitterbot', 'whatsapp', + 'telegrambot', 'linkedinbot', 'pinterest', 'slackbot', + 'viberbot', 'discordbot', 'applebot', 'googlebot', + 'bingbot', 'yandex', 'baiduspider', 'duckduckbot' + ]; + + const isCrawler = crawlers.some(crawler => userAgent.includes(crawler)); + + if (!isCrawler) { + return next(); + } + + const baseUrl = 'https://video.folx.tv'; + const pageUrl = `${baseUrl}/player`; + const title = 'Professional Player - video.folx.tv'; + const description = 'Professioneller Video Player mit MTV-Style Overlay Graphics und Streaming-Funktionen auf video.folx.tv'; + const imageUrl = `${baseUrl}/images/logo.svg`; + + const html = ` + + + + + ${title} + + + + + + + + + + + + + + + + + + +

${title}

+

${description}

+

Zum Player auf video.folx.tv

+ +`; + + res.set('Content-Type', 'text/html'); + res.send(html); + }); + + // Server-side meta tags for /live page (crawlers + SEO) + app.get('/live', (req, res, next) => { + const userAgent = req.headers['user-agent']?.toLowerCase() || ''; + + const crawlers = [ + 'facebookexternalhit', 'facebot', 'twitterbot', 'whatsapp', + 'telegrambot', 'linkedinbot', 'pinterest', 'slackbot', + 'viberbot', 'discordbot', 'applebot', 'googlebot', + 'bingbot', 'yandex', 'baiduspider', 'duckduckbot' + ]; + + const isCrawler = crawlers.some(crawler => userAgent.includes(crawler)); + + if (!isCrawler) { + return next(); + } + + const baseUrl = 'https://video.folx.tv'; + const pageUrl = `${baseUrl}/live`; + const title = 'LIVE Stream - video.folx.tv'; + const description = 'Live Stream auf video.folx.tv - Schauen Sie exklusive Inhalte in Echtzeit. FOLX TV Live Streaming rund um die Uhr.'; + const imageUrl = `${baseUrl}/images/logo.svg`; + + const html = ` + + + + + ${title} + + + + + + + + + + + + + + + + + + +

${title}

+

${description}

+

Zum Live Stream auf video.folx.tv

+ +`; + + res.set('Content-Type', 'text/html'); + res.send(html); + }); + // Sitemap.xml for SEO app.get("/sitemap.xml", async (req, res) => { try { @@ -297,6 +411,31 @@ export async function registerRoutes(app: Express): Promise { daily 1.0 + + ${baseUrl}/live + always + 0.9 + + + ${baseUrl}/player + weekly + 0.7 + + + ${baseUrl}/folx-stadl + weekly + 0.7 + + + ${baseUrl}/geschichte-lied + weekly + 0.7 + + + ${baseUrl}/gipfelstammtisch + weekly + 0.7 + `; for (const video of videos) {