Skip to content

Commit 9cbe860

Browse files
committed
set allow_origin_pat when CORS checks are disabled
notebook server doesn't properly apply allow_origin=* on server-side validation, e.g. direct requests for /blob/somefile
1 parent 90b4394 commit 9cbe860

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

helm-chart/binderhub/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ jupyterhub:
9090
allow_origin = cors.get('allowOrigin')
9191
if allow_origin:
9292
args.append('--NotebookApp.allow_origin=' + allow_origin)
93+
# allow_origin=* doesn't properly allow cross-origin requests to single files
94+
# see https://github.com/jupyter/notebook/pull/5898
95+
if allow_origin == '*':
96+
args.append('--NotebookApp.allow_origin_pat=.*')
9397
args += self.args
9498
return args
9599

0 commit comments

Comments
 (0)