CSP iframe Demo

A simple demonstration of Content Security Policy (CSP) frame-src directive behavior with different configurations.

Test Pages

  1. Test 1 (/test1) - CSP: frame-src 'none'

  2. Test 2 (/test2) - CSP: frame-src 'self'

  3. Test 3 (/test3) - CSP: frame-src 'self'

Structure

  • backend/index.ts - Main Hono server with CSP headers
  • frontend/ - Static HTML pages for each test
  • frontend/hello.html - Simple hello world page (no iframes)
  • frontend/hello-with-iframe.html - Hello world page with iframe to external site
  • frontend/hello-with-nested-srcdoc.html - Hello world page with srcdoc containing external iframe