From 72e9879394d3f82de9b5f4911295b81ee92f260b Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 6 Apr 2025 23:05:24 +0300 Subject: Allow embedding the Bandcamp player for jam posts Bandcamp embeds use iframes. I should probably collect more info on popular embeds and potentially allowlist them here. Change-Id: I7e0b4dae2ac052f6a48ad629c658b2bf851151ff --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index e2fac56..4aeaca5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -320,6 +320,10 @@ St: Clone + Send + Sync + 'static "style-src 'self';", // Only use styles we serve. "base-uri 'none';", // Do not allow to change the base URI. "object-src 'none';", // Do not allow to embed objects (Flash/ActiveX). + + // Allow embedding the Bandcamp player for jam posts. + // TODO: perhaps make this policy customizable?… + "frame-src 'self' https://bandcamp.com/EmbeddedPlayer/;" ) ) )) -- cgit 1.4.1