Skip to content

Commit

Permalink
Add read of SSL environment variable for HubAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed May 27, 2019
1 parent a5e55bb commit e6d4bfa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions batchspawner/singleuser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys

from runpy import run_path
Expand All @@ -9,6 +10,9 @@
def main(argv=None):
port = random_port()
hub_auth = HubAuth()
hub_auth.client_ca = os.environ.get('JUPYTERHUB_SSL_CLIENT_CA', '')
hub_auth.certfile = os.environ.get('JUPYTERHUB_SSL_CERTFILE', '')
hub_auth.keyfile = os.environ.get('JUPYTERHUB_SSL_KEYFILE', '')
hub_auth._api_request(method='POST',
url=url_path_join(hub_auth.api_url, 'batchspawner'),
json={'port' : port})
Expand Down

0 comments on commit e6d4bfa

Please sign in to comment.