Created
May 21, 2018 20:27
-
-
Save gpsarkar/4b6f9b48a21a7b2000d1a2311c0f7f51 to your computer and use it in GitHub Desktop.
CSP report proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: The CSP report server should be on the same origin as the website, otherwise some browsers won't send the report. This can easily be achieved with a proxy. Here's an Nginx example: | |
location /csp-report { | |
rewrite ^(.*)$ / break; # Rewrite everything to just / | |
proxy_pass http://csp-report.herokuapp.com; | |
} | |
Ref: https://github.com/bu-ist/csp-report |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment