Expand description
nostr-bbs link-preview-api Worker (Rust port)
Proxies requests to fetch OpenGraph metadata, bypassing CORS. Replaces the TypeScript Cloudflare Workers implementation.
§Module structure
ssrf– SSRF protection (private/internal URL blocking)parse– OpenGraph metadata extraction, HTML entity decodingoembed– Twitter/X oEmbed detection and fetching
§Endpoints
GET /preview?url=… – fetch OG metadata or Twitter oEmbed GET /health – health check GET /stats – cache statistics (CF Cache API) OPTIONS – CORS preflight