Remove unnecessary flag, forward-ssl

Import socket when needed

Move pwd import since more than one thing uses it.
This commit is contained in:
Thomas Mendoza
2018-06-07 16:00:45 -07:00
parent 753bd0701f
commit 7c6972df7e
3 changed files with 2 additions and 2 deletions

View File

@@ -1718,6 +1718,7 @@ class JupyterHub(Application):
internal_key_pair = cert_store.get("localhost")
if not internal_key_pair:
import socket
alt_names = "IP:127.0.0.1,DNS:localhost,{extra_names}"
# In the event the hub needs to be accessed externally, add
# the fqdn and (optionally) rev_proxy to the set of alt_names.

View File

@@ -569,7 +569,6 @@ class ConfigurableHTTPProxy(Proxy):
cmd.extend(['--api-ssl-ca', self.app.internal_ssl_ca])
cmd.extend(['--api-ssl-request-cert'])
cmd.extend(['--api-ssl-reject-unauthorized'])
cmd.extend(['--forward-ssl'])
if self.app.statsd_host:
cmd.extend([
'--statsd-host', self.app.statsd_host,

View File

@@ -14,6 +14,7 @@ import shutil
import signal
import sys
import warnings
import pwd
from subprocess import Popen
from tempfile import mkdtemp
@@ -968,7 +969,6 @@ def set_user_setuid(username, chdir=True):
home directory.
"""
import grp
import pwd
user = pwd.getpwnam(username)
uid = user.pw_uid
gid = user.pw_gid