Show More
|
1 | NO CONTENT: new file 100644 |
@@ -0,0 +1,17 b'' | |||
|
1 | #!/usr/bin/env python | |
|
2 | # -*- coding: utf-8 -*- | |
|
3 | ||
|
4 | class CSPReportHandler(IPythonHandler): | |
|
5 | '''Accepts a content security policy violation report''' | |
|
6 | @web.authenticated | |
|
7 | @json_errors | |
|
8 | def post(self): | |
|
9 | '''Log a content security policy violation report''' | |
|
10 | csp_report = self.get_json_body() | |
|
11 | self.log.debug(csp_report) | |
|
12 | ||
|
13 | csp_report_uri = r"/api/security/csp-report" | |
|
14 | ||
|
15 | default_handlers = [ | |
|
16 | (csp_report_uri, CSPReportHandler) | |
|
17 | ] |
General Comments 0
You need to be logged in to leave comments.
Login now