diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index ee43a75244..daead622cd 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -788,11 +788,11 @@ impl Server { ); headers.insert( header::CONTENT_SECURITY_POLICY, - HeaderValue::from_static("default-src 'self' 'unsafe-eval' 'unsafe-inline' data:"), + HeaderValue::from_static("default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob:"), ); headers.append( header::CONTENT_SECURITY_POLICY, - HeaderValue::from_static("default-src *:*/content/ *:*/blockheight *:*/blockhash *:*/blockhash/ *:*/blocktime 'unsafe-eval' 'unsafe-inline' data:"), + HeaderValue::from_static("default-src *:*/content/ *:*/blockheight *:*/blockhash *:*/blockhash/ *:*/blocktime 'unsafe-eval' 'unsafe-inline' data: blob:"), ); headers.insert( header::CACHE_CONTROL, @@ -2302,7 +2302,7 @@ mod tests { server.assert_response_csp( format!("/preview/{}", InscriptionId::from(txid)), StatusCode::OK, - "default-src 'self' 'unsafe-eval' 'unsafe-inline' data:", + "default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob:", "hello", ); } diff --git a/tests/server.rs b/tests/server.rs index d3642a6512..af7c934f52 100644 --- a/tests/server.rs +++ b/tests/server.rs @@ -189,8 +189,8 @@ fn inscription_content() { .into_iter() .collect::>(), &[ - "default-src 'self' 'unsafe-eval' 'unsafe-inline' data:", - "default-src *:*/content/ *:*/blockheight *:*/blockhash *:*/blockhash/ *:*/blocktime 'unsafe-eval' 'unsafe-inline' data:", + "default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob:", + "default-src *:*/content/ *:*/blockheight *:*/blockhash *:*/blockhash/ *:*/blocktime 'unsafe-eval' 'unsafe-inline' data: blob:", ] ); assert_eq!(response.bytes().unwrap(), "FOO");