One unified CSP report URI

Kyle Kelley 12 years ago
parent 5065429bfd
commit 392118d536

@ -1 +1,4 @@
# URI for the CSP Report. Included here to prevent a cyclic dependency.
# csp_report_uri is needed both by the BaseHandler (for setting the report-uri)
# and by the CSPReportHandler (which depends on the BaseHandler).
csp_report_uri = r"/api/security/csp-report"

@ -6,6 +6,7 @@
from tornado import gen, web
from ...base.handlers import IPythonHandler, json_errors
from . import csp_report_uri
class CSPReportHandler(IPythonHandler):
'''Accepts a content security policy violation report'''
@ -16,8 +17,6 @@ class CSPReportHandler(IPythonHandler):
csp_report = self.get_json_body()
self.log.debug(csp_report)
csp_report_uri = r"/api/security/csp-report"
default_handlers = [
(csp_report_uri, CSPReportHandler)
]

Loading…
Cancel
Save