CSP for Rust Playground: lock down code execution

If you’re building a Rust Playground-style app, your threat model is ugly in all the fun ways. You’re taking user input, compiling or executing code, rendering output, maybe embedding an editor, maybe shipping WebAssembly, and probably sprinkling in some analytics or third-party UI bits because product people always want one more script. That’s exactly the kind of app where Content Security Policy earns its keep. A Rust Playground is not just “another website.” It’s a code execution surface with a browser front end. Even if your actual Rust execution happens in a locked-down backend container, your frontend is still exposed to XSS, supply-chain script injection, data exfiltration, and clickjacking. CSP helps reduce that blast radius. ...

October 13, 2026 · 7 min · headertest.com

CSP for Mermaid Diagrams: A Before-and-After Case Study

I’ve seen this exact failure pattern a few times: a team adds Mermaid to docs or an internal dashboard, the diagrams look great locally, then production CSP quietly wrecks everything. The symptoms are boring but expensive: diagrams don’t render initialization throws console errors someone “fixes” it by adding 'unsafe-inline' or weakening script-src now the page works, but the policy got worse Mermaid is a perfect example of where frontend convenience collides with a real CSP. If you run a site with a strict policy, you can’t just paste the snippet from a README and hope for the best. ...

October 11, 2026 · 6 min · headertest.com

CSP for Google Docs Viewer: What to Allow and What to Avoid

If you’ve ever embedded a PDF, DOCX, or PPTX with Google Docs Viewer, you’ve probably hit the same wall everyone does: your Content Security Policy breaks it. That’s not a bug. That’s CSP doing its job. The annoying part is that Google Docs Viewer sits in an awkward middle ground. It’s convenient, familiar, and dead simple to drop into an <iframe>. But once you care about a tight CSP, third-party framing gets messy fast. You have to decide how much trust you want to hand to Google for a document-rendering feature that may not even be essential. ...

October 5, 2026 · 6 min · headertest.com

CSP for Material UI (MUI): What Actually Works

Material UI is one of those libraries that makes frontend teams fast and security teams nervous. The problem is simple: MUI relies on runtime-generated CSS. CSP, if you configure it properly, is hostile to runtime-generated inline styles unless you make an exception. That tension forces a choice: loosen your policy, wire up nonces correctly, or rethink how styles are injected. If you’re building with MUI, the right CSP setup depends on which styling path you’re using: ...

October 4, 2026 · 6 min · headertest.com

CSP for LSD: Securing Layered CSS Without Breaking It

CSS got weird again, in a good way. Between @layer, design tokens, component libraries, runtime theming, and CSS-in-JS leftovers, a lot of teams now have what I’d call an LSD setup: a Layer System for CSS. You split styles into predictable layers like reset, tokens, base, components, utilities, and overrides. That’s cleaner than the old cascade knife fight. But CSP can get awkward fast, especially when your CSS pipeline injects styles, swaps themes at runtime, or leans on inline <style> blocks. ...

October 3, 2026 · 7 min · headertest.com

CSP for DartPad: Lock It Down Without Breaking It

DartPad-style apps are a weird CSP target. You’re not just serving a normal frontend. You’ve got inline bootstrapping code, dynamic script loading, iframes, workers, API calls, maybe WebSockets, and often some analytics or consent tooling bolted on top. That combination is exactly where people give up and slap unsafe-inline and unsafe-eval into production. I’ve done that under deadline pressure. I’ve regretted it every time. If you’re building something like DartPad, the goal is to allow the platform features you actually need without turning CSP into decorative security theater. ...

October 1, 2026 · 6 min · headertest.com

CSP for Whimsical Embeds

If you embed Whimsical and your CSP is even slightly too strict, it will break in ways that are annoying to debug. Usually you get a blank iframe, a console error, and a vague sense that CSP is punishing you for trying to ship something useful. Here’s the good news: Whimsical embeds are usually straightforward because they’re iframe-based. That means you often only need to allow the Whimsical frame itself, instead of opening up script-src or connect-src all over your app. ...

September 29, 2026 · 6 min · headertest.com

CSP for Clarity (VMware): Pros, Cons, and Safer Patterns

Clarity gives you a solid design system. CSP gives you a solid boundary. The annoying part is getting both to cooperate without punching holes in your policy. If you’re using VMware Clarity and trying to keep a sane Content Security Policy, the trade-offs are pretty familiar: developer ergonomics vs actual security, static hosting vs runtime nonces, and “just make it work” vs “I’d like to block XSS this year.” This guide compares the main ways teams approach CSP with Clarity-heavy apps, where the pain usually shows up, and what I’d recommend in practice. ...

September 28, 2026 · 7 min · headertest.com

CSP Mistakes With Bandcamp Embeds and How to Fix Them

Bandcamp embeds look simple right up until your CSP starts blocking them. You paste the iframe, refresh, and get a blank box or a console full of violations. I’ve seen this pattern a lot: teams lock down CSP correctly, then third-party embeds get boladted on later and nobody updates the policy with any care. The result is usually one of two bad outcomes: the embed breaks, or somebody “fixes” it by allowing way too much. Bandcamp is pretty tame compared to ad tech or social widgets, but there are still a few easy mistakes that keep showing up. Here’s what tends to go wrong, and how I’d fix it without turning your CSP into allow basically everything. ...

September 26, 2026 · 7 min · headertest.com

Common CSP Mistakes with Fluent UI and How to Fix Them

Fluent UI is great until you turn on a real Content Security Policy and your app suddenly looks half-broken. I’ve hit this a few times with React apps using Fluent UI. Buttons still render, but spacing is off, icons disappear, focus styles get weird, and the console starts yelling about blocked styles. The root cause is usually the same: Fluent UI has historically relied on runtime style injection, and strict CSP setups don’t like that unless you wire things correctly. ...

September 23, 2026 · 7 min · headertest.com