A simple web application to send CSP violation reports to an email address
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
bn4t 7493df54ff Merge remote-tracking branch 'origin/master' 1ヶ月前
.drone.yml trigger ci build 1ヶ月前
.env.sample add ratelimit and other improvements 5ヶ月前
.gitignore Initial Commit 5ヶ月前
Dockerfile add docker support 5ヶ月前
LICENSE add license 5ヶ月前
README.md Update 'README.md' 5ヶ月前
cron.go add license 5ヶ月前
csp-handler.go Don't send mail in new goroutine 5ヶ月前
docker-compose.yml Add port mapping 5ヶ月前
go.mod Updated dependencies 1ヶ月前
go.sum Updated dependencies 1ヶ月前
mail.go add license 5ヶ月前
main.go add license 5ヶ月前
utils.go add license 5ヶ月前

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