Serve feeds as text/xml instead of application/rss+xml

Browsers (Firefox in particular) force-download application/rss+xml and
application/atom+xml instead of rendering them, which is confusing for
site visitors who click a feed link directly rather than pasting it into
a reader. text/xml renders inline as an XML tree in every major browser.
Feed readers (FreshRSS included) sniff the actual XML content to detect
RSS/Atom, so this has no effect on subscription behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
para
2026-09-25 23:34:30 +02:00
co-authored by Claude Sonnet 5
parent a46e9c64a2
commit 113616995f
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -16,7 +16,8 @@ function fetch_facebook_feed(): string
return http_get(FETCHRSS_URL, ['Accept: application/atom+xml, application/xml']);
}
header('Content-Type: application/atom+xml; charset=utf-8');
// text/xml plutot que application/atom+xml : voir la note dans common.php
header('Content-Type: text/xml; charset=utf-8');
if (!is_dir(CACHE_DIR)) {
mkdir(CACHE_DIR, 0775, true);