blob: 83e31266c4de11021ffa6bba3fe85f4763931a82 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style
3# license that can be found in the LICENSE file or at
4# https://developers.google.com/open-source/licenses/bsd
5
6"""Servlet for Content Security Policy violation reporting.
7See http://www.html5rocks.com/en/tutorials/security/content-security-policy/
8for more information on how this mechanism works.
9"""
10from __future__ import print_function
11from __future__ import division
12from __future__ import absolute_import
13
14import webapp2
15import logging
16
17
18class CSPReportPage(webapp2.RequestHandler):
19 """CSPReportPage serves CSP violation reports."""
20
21 def post(self):
22 logging.error('CSP Violation: %s' % self.request.body)