mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-18 11:55:46 +08:00
allow setting token via JUPYTER_TOKEN env
more convenient for certain deployments than CLI arguments
This commit is contained in:
parent
2ee51ab09f
commit
91469d2672
@ -662,6 +662,9 @@ class NotebookApp(JupyterApp):
|
||||
|
||||
@default('token')
|
||||
def _token_default(self):
|
||||
if os.getenv('JUPYTER_TOKEN'):
|
||||
self._token_generated = False
|
||||
return os.getenv('JUPYTER_TOKEN')
|
||||
if self.password:
|
||||
# no token if password is enabled
|
||||
self._token_generated = False
|
||||
|
Loading…
Reference in New Issue
Block a user