mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-10-31 04:02:03 +01:00
feat(api): add RSS/Atom feeds for public mesh data
Four feeds (public messages, node adverts deduped per node, new nodes, per-community-channel messages), each in RSS 2.0 and Atom, built with stdlib ElementTree. Feeds are hard-pinned to the logged-out view (anonymous visibility, spam always filtered, identity headers ignored) and served at clean public web URLs (/feeds/*) via a shared proxy helper that forwards If-None-Match + X-Forwarded-* and gates on maintenance mode. Responses are Redis-cached (ETag/304, public max-age) and invalidated with messages/adverts/channels mutations. Item/self links always target the public web endpoint; WEB_PUBLIC_URL pins the canonical origin. Includes a FEATURE_FEEDS kill switch, SPA autodiscovery <link> tags, and env/docs updates (v0.21.0 upgrading notes).
This commit is contained in:
21 files changed
+2115
-110
No files matched your search
@@ -337,6 +337,15 @@ services:
|
||||
- REDIS_KEY_PREFIX=${REDIS_KEY_PREFIX:-hub}
|
||||
- REDIS_CACHE_TTL=${REDIS_CACHE_TTL:-30}
|
||||
- REDIS_CACHE_TTL_DASHBOARD=${REDIS_CACHE_TTL_DASHBOARD:-3600}
|
||||
- REDIS_CACHE_TTL_FEEDS=${REDIS_CACHE_TTL_FEEDS:-300}
|
||||
# RSS/Atom feeds kill switch (bridged from FEATURE_FEEDS so the API, the
|
||||
# web alias, and autodiscovery links track one operator-facing var).
|
||||
- FEEDS_ENABLED=${FEATURE_FEEDS:-true}
|
||||
# Feed titles need the network display name in the API tier too.
|
||||
- NETWORK_NAME=${NETWORK_NAME:-MeshCore Network}
|
||||
# Canonical public site URL for absolute feed links (empty = derive
|
||||
# from the forwarded request host via the web proxy).
|
||||
- WEB_PUBLIC_URL=${WEB_PUBLIC_URL:-}
|
||||
- API_CACHE_CONTROL_ENABLED=${API_CACHE_CONTROL_ENABLED:-true}
|
||||
# Spam detection: hide-filter switch + threshold (bridged from
|
||||
# FEATURE_SPAM_DETECTION so it tracks the collector and web toggle). On by
|
||||
@@ -440,6 +449,9 @@ services:
|
||||
- FEATURE_SPAM_DETECTION=${FEATURE_SPAM_DETECTION:-true}
|
||||
# Routes page (route health monitoring) is on by default.
|
||||
- FEATURE_ROUTES=${FEATURE_ROUTES:-true}
|
||||
# RSS/Atom feeds (/feeds/* + autodiscovery links); mirrors the API's
|
||||
# FEEDS_ENABLED switch via Compose.
|
||||
- FEATURE_FEEDS=${FEATURE_FEEDS:-true}
|
||||
command: ["web"]
|
||||
healthcheck:
|
||||
test:
|
||||
|
||||
Reference in new issue
Block a user