Skip to main content

Crate nostr_bbs_preview_worker

Crate nostr_bbs_preview_worker 

Source
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 decoding
  • oembed – 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