
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888

# Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
# For headerssent by the upstream reverse proxy. Necessary if the proxy handles
# SSL
c.NotebookApp.trust_xheaders = True

# Supply overrides for the tornado.web.Application that the IPython notebook
# uses.
c.NotebookApp.webapp_settings = {
    'X-Frame-Options': 'ALLOW FROM nature.com',
    'template_path':['/srv/ga/', '/srv/ipython/IPython/html',
                     '/srv/ipython/IPython/html/templates']
}


c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888

# Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
# For headerssent by the upstream reverse proxy. Necessary if the proxy handles
# SSL
c.NotebookApp.trust_xheaders = True

# Supply overrides for the tornado.web.Application that the IPython notebook
# uses.
c.NotebookApp.webapp_settings = {
    'X-Frame-Options': 'ALLOW FROM nature.com',
    'Content-Security-Policy': "frame-ancestors 'self' *.nature.com",
    'template_path':['/srv/ga/', '/srv/ipython/IPython/html',
                     '/srv/ipython/IPython/html/templates']
}

Set the content security policy
Set the content security policy

  
  c = get_config()
  c.NotebookApp.ip = '*'
  c.NotebookApp.open_browser = False
  c.NotebookApp.port = 8888
  
  # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
  # For headerssent by the upstream reverse proxy. Necessary if the proxy handles
  # SSL
  c.NotebookApp.trust_xheaders = True
  
  # Supply overrides for the tornado.web.Application that the IPython notebook
  # uses.
  c.NotebookApp.webapp_settings = {
      'X-Frame-Options': 'ALLOW FROM nature.com',
+     'Content-Security-Policy': "frame-ancestors 'self' *.nature.com",
      'template_path':['/srv/ga/', '/srv/ipython/IPython/html',
                       '/srv/ipython/IPython/html/templates']
  }
  
Set the content security policy
## Code Before:

c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888

# Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
# For headerssent by the upstream reverse proxy. Necessary if the proxy handles
# SSL
c.NotebookApp.trust_xheaders = True

# Supply overrides for the tornado.web.Application that the IPython notebook
# uses.
c.NotebookApp.webapp_settings = {
    'X-Frame-Options': 'ALLOW FROM nature.com',
    'template_path':['/srv/ga/', '/srv/ipython/IPython/html',
                     '/srv/ipython/IPython/html/templates']
}

## Instruction:
Set the content security policy
## Code After:

c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888

# Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
# For headerssent by the upstream reverse proxy. Necessary if the proxy handles
# SSL
c.NotebookApp.trust_xheaders = True

# Supply overrides for the tornado.web.Application that the IPython notebook
# uses.
c.NotebookApp.webapp_settings = {
    'X-Frame-Options': 'ALLOW FROM nature.com',
    'Content-Security-Policy': "frame-ancestors 'self' *.nature.com",
    'template_path':['/srv/ga/', '/srv/ipython/IPython/html',
                     '/srv/ipython/IPython/html/templates']
}
