mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 18:14:10 +00:00
Remove unnecessary flag, forward-ssl
Import socket when needed Move pwd import since more than one thing uses it.
This commit is contained in:
@@ -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.
|
||||||
|
@@ -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,
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user