Skip to content

Commit d3ec768

Browse files
committed
Changed installation script so tornado supports CSP frame ancestors property
1 parent d4e4dd6 commit d3ec768

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

utilities/install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def main(netpyne_branch, workspace_branch, geppetto_branch=None, skipNpm=False,
171171
_ = config['NotebookApp']['tornado_settings']
172172
except KeyError:
173173
config['NotebookApp']['tornado_settings'] = {}
174+
config['NotebookApp']['tornado_settings']['headers'] = { 'Content-Security-Policy': "frame-ancestors 'self' *" }
174175
config['NotebookApp']['tornado_settings']['gzip'] = True
175176
f.seek(0)
176177
json.dump(config, f, indent=4, sort_keys=True)

webapp/test-frame/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>IFrame NePyNE-UI</title>
5+
</head>
6+
<body>
7+
8+
<h2>IFrame NePyNE-UI</h2>
9+
10+
<!-- IFrame element -->
11+
<iframe src="http://localhost:8888/geppetto" width="1200" height="1200">
12+
<!-- Alternative content for browsers that do not support iframes -->
13+
<p>Your browser does not support iframes.</p>
14+
</iframe>
15+
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)