},
)
.into_response(),
),
Media::Font => Ok(
(
[(
header::CONTENT_SECURITY_POLICY,
"script-src-elem 'self'; style-src 'self' 'unsafe-inline';",
)],
PreviewFontHtml { inscription_id },
)
.into_response(),
),
Media::Iframe => Ok(
Self::content_response(inscription, accept_encoding, &page_config)?
.ok_or_not_found(|| format!("inscription {inscription_id} content"))?
.into_response(),
),
Media::Image => Ok(
(
[(
header::CONTENT_SECURITY_POLICY,
"default-src 'self' 'unsafe-inline'",
)],
PreviewImageHtml { inscription_id },
)
.into_response(),
),
Media::Markdown => Ok(
(
[(
header::CONTENT_SECURITY_POLICY,
"script-src-elem 'self' https://cdn.jsdelivr.net",
)],
PreviewMarkdownHtml { inscription_id },