Commit Graph
3 Commits
Author SHA1 Message Date
paraandClaude Sonnet 5 476c1bf413 Fix W3C validator errors in the Facebook feed proxy
FetchRSS's raw feed fails validation: entry <id> is a bare Facebook post
ID rather than a full URI, and <link rel="self"> points at the FetchRSS
URL instead of where we actually serve it. Parse the fetched XML with
DOMDocument and fix both before caching/serving: reuse each entry's own
alternate link (already a full post URL) as its id, and rewrite the self
link to our own facebook.php URL.

Requires the php-xml extension (ext-dom) — near-universal on shared
hosting, but worth checking if this breaks on deploy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 00:23:02 +02:00
paraandClaude Sonnet 5 113616995f 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>
2026-09-25 23:34:30 +02:00
paraandClaude Sonnet 5 8205bfdffc Add PHP variant: no-cron, request-time feed generation for shared hosting
Same imio.smartweb JSON API as the Python script, but each feed regenerates
on demand (15 min file cache) instead of via cron, so it works on plain
PHP shared hosting with no server config access. Also adds facebook.php,
a caching proxy for the user's FetchRSS Atom feed so all three feeds live
under one domain and can be shared as stable URLs.

Tested with PHP 8.3 CLI: valid XML, real data (40 news, 12 events, proxied
Facebook feed).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 22:05:26 +02:00