This page tests various CSP directives. Click the buttons to trigger tests. Check the browser's developer console for detailed CSP violation reports if tests fail.
Applied Policy: default-src 'self'; script-src 'self' https://cdnjs.cloudflare.com 'unsafe-inline'; object-src 'none'; worker-src 'self' blob:; connect-src 'self' https://example.com; img-src 'self' https://via.placeholder.com data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; media-src 'self'; font-src 'self' https://fonts.gstatic.com; frame-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; report-uri /csp_reports
default-src 'self' (via Fetch)Tests if fetching a resource from the same origin is allowed.
script-src 'self' https://cdnjs... 'unsafe-inline'Tests loading external scripts (CDN) and using inline event handlers (like onclick).
object-src 'none'Tests if embedding content with is blocked.
worker-src 'self' blob:Tests creating Web Workers from Blob URLs and same-origin scripts.
connect-src 'self' https://example.comTests network connections (Fetch/XHR) to allowed and blocked origins.
img-src 'self' https://via.placeholder.com data:Tests loading images from different allowed sources.
style-src 'self' 'unsafe-inline' https://fonts.g...Tests applying inline styles and loading external stylesheets.
font-src 'self' https://fonts.gstatic.comThis text uses Roboto font (if loaded).
Tests loading fonts from allowed external origins (requires the stylesheet test to pass first).
frame-src 'self'Tests embedding iframes from allowed and blocked origins.
base-uri 'self'Tests if setting the tag to an external URL is blocked (should fail).
form-action 'self'Tests if form submissions are restricted to allowed origins.