Connecting to JupyterHub from vscode.dev - microsoft/vscode-jupyter-hub GitHub Wiki
Accessing JuptyerHub from vscode.dev, github.dev or the like requires some special configuration of the JupyterHub application.
- Generate a configuration file for JuptyerHub as defined in the JupyterHub configuration docs
- Ensure the configuration file has the following settings to allow access to JupyterHub from other web applications:
origin = '*'
c.Spawner.args = [f'--NotebookApp.allow_origin={origin}']
c.JupyterHub.tornado_settings = {
'headers': {
'Access-Control-Allow-Origin': origin,
'Access-Control-Allow-Private-Network': 'true',
},
}
Note:
'Access-Control-Allow-Private-Network': 'true'
is required only if JupyterHub is running on your local machine