Skip to content

Brunty/csp-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project for demo of CSP

This uses docker to get up and running. I run it locally with codekitchen/dinghy-http-proxy.

Then run:

docker-compose up --build -d

If you wish to re-create or tinker with some of the things shown in the live demo I've done - here are the various pieces to the puzzle:

app/src/Middleware/CspMiddleware.php is the class that adds middleware to a response in the app. It has the policy passed in as it's first constructor argument - the middleware is attached to routes for the application in app/resources/config/routing.php

Alternatively if you want to activate Report-Only mode, use: app/src/Middleware/CspReportOnlyMiddleware.php

About

🔒 A small site to demo some CSP concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published