mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-21 06:13:48 +00:00
feat: reader-rendering correctness + privacy hardening (P1·S batch)
Close the five open P1·S items from TODO.md: - X-Robots-Tag: noindex on rss/atom/entries/files + a /robots.txt - absolutize relative content URLs against the sender's site - promote lazy-loaded images (data-src → src, strip loading="lazy") - strip XML-illegal control chars from generated feeds (keep emoji) - plain-text feed <title> (strip HTML, decode entities) Sender-base derivation lives on the EmailAddress value object (siteBaseUrl) instead of a misplaced favicon helper. Bump to 0.2.1 and document the changes in README + CLAUDE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -184,6 +184,14 @@ app.get("/health", (c) => c.json({ status: "ok", timestamp: Date.now() }));
|
||||
// Public status page (counters + link to admin)
|
||||
app.get("/", handleHome);
|
||||
|
||||
// Keep private feeds/emails out of search engines (defense in depth alongside
|
||||
// the X-Robots-Tag headers on the feed/entry/file responses).
|
||||
app.get("/robots.txt", (c) =>
|
||||
c.text(
|
||||
"User-agent: *\nDisallow: /rss/\nDisallow: /atom/\nDisallow: /entries/\nDisallow: /files/\nDisallow: /admin/\n",
|
||||
),
|
||||
);
|
||||
|
||||
// Catch-all for 404s
|
||||
app.all("*", (c) => c.text("Not Found", 404));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user