diff options
| author | E.T. <190912194+ElectricTea@users.noreply.github.com> | 2026-01-11 03:07:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-11 08:07:55 +0000 |
| commit | 0e938c14044f66f7ad0ffe3eeda5fa8969a83849 (patch) | |
| tree | 5a4606bdbb494df435bf194127c53c729223b04b /apps/workers | |
| parent | fe122b50069b00d511cb2fb3512a968b15f39e20 (diff) | |
| download | karakeep-0e938c14044f66f7ad0ffe3eeda5fa8969a83849.tar.zst | |
fix: Accept more permissive RSS feed content types and Fix User-Agent key (#2353)
* Fix User-Agent key and accept more permissive content types
Some feeds are Content-Type application/xml only and will respond with a 406 error to responses with a header of content type application/rss+xml. This change allows for the more permissive content types application/xml and text/xml to be accepted
Also fixes UserAgent with correct User-Agent
* Fix: Remote trailing whitespace in feedWorker.ts
Fix formatting on HTTP Header for RSS Accceptable Content-Types introduced in commit 6896392
* format
Diffstat (limited to 'apps/workers')
| -rw-r--r-- | apps/workers/workers/feedWorker.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/workers/workers/feedWorker.ts b/apps/workers/workers/feedWorker.ts index cd4f3e82..eed7ccb1 100644 --- a/apps/workers/workers/feedWorker.ts +++ b/apps/workers/workers/feedWorker.ts @@ -156,9 +156,9 @@ async function run(req: DequeuedJob<ZFeedRequestSchema>) { const response = await fetchWithProxy(feed.url, { signal: AbortSignal.timeout(5000), headers: { - UserAgent: + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", - Accept: "application/rss+xml", + Accept: "application/rss+xml, application/xml;q=0.9, text/xml;q=0.8", }, }); if (response.status !== 200) { |
