'Set any headers passed as tornado_settings[\'headers\'].
By default sets Content-Security-Policy of frame-ancestors \'self\'.'

def set_default_headers(self):

    headers = self.settings.get('headers', {})
    headers.setdefault('X-JupyterHub-Version', __version__)
    for (header_name, header_content) in headers.items():
        self.set_header(header_name, header_content)
    if ('Content-Security-Policy' not in headers):
        self.set_header('Content-Security-Policy', self.content_security_policy)
