//! Embeddable widget routes; public, no auth, iframe-friendly. //! //! All routes under `/embed/` serve self-contained HTML pages designed to be //! loaded inside iframes on external sites. They cache for 5 minutes; framing //! and CSP are owned by the global `security_headers_middleware`, not by //! anything under this module. mod item; mod project; mod user; use crate::AppState; use axum::{Router, routing::get}; pub fn embed_routes() -> Router { Router::new() // Item embeds .route("/embed/i/{item_id}/button", get(item::item_button)) .route("/embed/i/{item_id}/card", get(item::item_card)) .route("/embed/i/{item_id}/player", get(item::item_player)) // Project embeds .route("/embed/p/{project_slug}/card", get(project::project_card)) // User embeds .route("/embed/u/{username}/tip", get(user::tip_button)) }