##// END OF EJS Templates
remove special handling of ipython_kernel in launcher...
remove special handling of ipython_kernel in launcher - set JPY_PARENT_PID and JPY_INTERRUPT_EVENT env variables for all kernels - no custom kernel args other that console passthrough - use devnull instead of `--no-stdout` (comments claim it shouldn't work, but tests suggest it does - let's keep an eye on this)

File last commit:

r19156:d3e620f5
r19188:a31d8820
Show More
handlers.py
23 lines | 715 B | text/x-python | PythonLexer
"""Tornado handlers for security logging."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
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'''
@web.authenticated
@json_errors
def post(self):
'''Log a content security policy violation report'''
csp_report = self.get_json_body()
self.log.warn("Content security violation: %s",
self.request.body.decode('utf8', 'replace'))
default_handlers = [
(csp_report_uri, CSPReportHandler)
]