A simple web application to send CSP violation reports to an email address
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
bn4t 7493df54ff Merge remote-tracking branch 'origin/master' il y a 1 mois
.drone.yml trigger ci build il y a 1 mois
.env.sample add ratelimit and other improvements il y a 5 mois
.gitignore Initial Commit il y a 5 mois
Dockerfile add docker support il y a 5 mois
LICENSE add license il y a 5 mois
README.md Update 'README.md' il y a 5 mois
cron.go add license il y a 5 mois
csp-handler.go Don't send mail in new goroutine il y a 5 mois
docker-compose.yml Add port mapping il y a 5 mois
go.mod Updated dependencies il y a 1 mois
go.sum Updated dependencies il y a 1 mois
mail.go add license il y a 5 mois
main.go add license il y a 5 mois
utils.go add license il y a 5 mois

README.md

CSP-Handler

A simple web application to send CSP violation reports to an email address

Important

CSP-Handler needs to be behind a reverse proxy which forwards either the X-Forwarded-For or X-Real-IP header, else ratelimiting won’t work.

Setup

  1. Clone the repository and enter the directory: git clone https://git.bn4t.me/bn4t/csp-handler.git && cd csp-handler
  2. Edit the environment variables in docker-compose.yml
  3. Build the image and start the container: docker-compose up --build -d

Usage

Include the report-uri directive in your content security policy:

report-uri https://csp-report.example.com/report-uri/mydomain.com

Replace mydomain.com with the domain on which this content security policy is deployed.

License

GPLv3