Skip to content

Commit 29df9e2

Browse files
committed
Make check_hostname configurable
1 parent 1fa8751 commit 29df9e2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

jupyter_server_proxy/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def load_jupyter_server_extension(nbapp):
3535
if serverproxy.https:
3636
ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=serverproxy.cafile)
3737
ssl_context.load_cert_chain(serverproxy.certfile, serverproxy.keyfile)
38-
ssl_context.check_hostname = False
38+
ssl_context.check_hostname = serverproxy.check_hostname
3939
ssl_options = ssl_context
4040

4141
# Set up default handler

jupyter_server_proxy/config.py

+6
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,9 @@ def _host_whitelist_default(self):
245245
""",
246246
config=True
247247
)
248+
249+
check_hostname = Bool(
250+
False,
251+
help="Whether to check hostname.",
252+
config=True
253+
)

0 commit comments

Comments
 (0)