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") internal_key_pair = cert_store.get("localhost")
if not internal_key_pair: if not internal_key_pair:
import socket
alt_names = "IP:127.0.0.1,DNS:localhost,{extra_names}" alt_names = "IP:127.0.0.1,DNS:localhost,{extra_names}"
# In the event the hub needs to be accessed externally, add # In the event the hub needs to be accessed externally, add
# the fqdn and (optionally) rev_proxy to the set of alt_names. # 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-ca', self.app.internal_ssl_ca])
cmd.extend(['--api-ssl-request-cert']) cmd.extend(['--api-ssl-request-cert'])
cmd.extend(['--api-ssl-reject-unauthorized']) cmd.extend(['--api-ssl-reject-unauthorized'])
cmd.extend(['--forward-ssl'])
if self.app.statsd_host: if self.app.statsd_host:
cmd.extend([ cmd.extend([
'--statsd-host', self.app.statsd_host, '--statsd-host', self.app.statsd_host,

View File

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