Skip to content

Commit

Permalink
duplicate NotebookApp CLI args to ServerApp
Browse files Browse the repository at this point in the history
ahead of ServerApp deprecating handling of NotebookApp aliases
  • Loading branch information
minrk committed Feb 15, 2023
1 parent 68e093f commit 2f7189e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions binderhub/binderspawner_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def get_args(self):
if self.cors_allow_origin == "*":
args.append("--NotebookApp.allow_origin_pat=.*")
args += self.args
# ServerApp compatibility: duplicate NotebookApp args
for arg in list(args):
if arg.startswith("--NotebookApp."):
args.append(arg.replace("--NotebookApp.", "--ServerApp."))
return args

def start(self):
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/binderhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ jupyterhub:
if self.cors_allow_origin == "*":
args.append("--NotebookApp.allow_origin_pat=.*")
args += self.args
# ServerApp compatibility: duplicate NotebookApp args
for arg in list(args):
if arg.startswith("--NotebookApp."):
args.append(arg.replace("--NotebookApp.", "--ServerApp."))
return args
def start(self):
Expand Down

0 comments on commit 2f7189e

Please sign in to comment.