Skip to content

Commit eea03c9

Browse files
committed
Added new frame ancestor directives
1 parent 1f971da commit eea03c9

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

utilities/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +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' *" }
174+
config['NotebookApp']['tornado_settings']['headers'] = { 'Content-Security-Policy': "frame-ancestors 'self' http: https: http://localhost:8081 *" }
175175
config['NotebookApp']['tornado_settings']['gzip'] = True
176176
f.seek(0)
177177
json.dump(config, f, indent=4, sort_keys=True)

webapp/package.bak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@sentry/integrations": "^6.16.1",
2727
"@sentry/react": "^6.16.1",
2828
"@sentry/tracing": "^6.16.1",
29+
"csp-html-webpack-plugin": "^5.1.0",
2930
"jquery": "^3.6.0",
3031
"js-base64": "^3.6.1",
3132
"less-vars-to-js": "^1.3.0",

webapp/test-frame/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h2>IFrame NePyNE-UI</h2>
99

1010
<!-- IFrame element -->
11-
<iframe src="http://localhost:8081/geppetto" width="1200" height="1200">
11+
<iframe src="http://localhost:8081" width="1200" height="1200">
1212
<!-- Alternative content for browsers that do not support iframes -->
1313
<p>Your browser does not support iframes.</p>
1414
</iframe>

webapp/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module.exports = function (env) {
153153
'script-src': ["'self'", "'unsafe-inline'"],
154154
'style-src': ["'self'", "'unsafe-inline'"],
155155
'img-src': ["'self'", 'data:', 'blob:'],
156-
'frame-ancestors': ['*']
156+
'frame-ancestors': ["'self' http: https: http://localhost http://localhost:8081 *"]
157157
}, {
158158
enabled: true,
159159
hashingMethod: 'sha256',

0 commit comments

Comments
 (0)