From 9bccf2883ed98b1ba9790f9db0682e0efff0541a Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 2 Mar 2026 18:38:23 +0000 Subject: [PATCH] Update news feed to correctly display articles from external sources Modify the RSS feed fetching mechanism to include more comprehensive browser-like headers, resolving 503 errors from external sources like Google News. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 44cfba06-1cd4-4bbd-bf22-a92739321028 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/nFw7xof Replit-Helium-Checkpoint-Created: true --- server/routes.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/routes.ts b/server/routes.ts index 81e1662..b363915 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -389,7 +389,12 @@ export async function registerRoutes( async function fetchRssFeed(rssUrl: string): Promise { const resp = await fetch(rssUrl, { - headers: { "User-Agent": "Mozilla/5.0 (compatible; FolxTV/1.0)" }, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Language": "de-DE,de;q=0.9,en;q=0.5", + "Cache-Control": "no-cache", + }, redirect: "follow", }); if (!resp.ok) throw new Error(`RSS fetch failed: ${resp.status}`);