Content Security Policy (CSP) Testing Page

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

Test default-src 'self' (via Fetch)

PENDING

Tests if fetching a resource from the same origin is allowed.

Test script-src 'self' https://cdnjs... 'unsafe-inline'

PENDING (CDN)
PENDING (Inline)

Tests loading external scripts (CDN) and using inline event handlers (like onclick).

Test object-src 'none'