Skip to content

Commit

Permalink
Make check_hostname configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
rcthomas committed Apr 23, 2020
1 parent e356772 commit 31033d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jupyter_server_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def load_jupyter_server_extension(nbapp):
if serverproxy.https:
ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=serverproxy.cafile)
ssl_context.load_cert_chain(serverproxy.certfile, serverproxy.keyfile)
ssl_context.check_hostname = False
ssl_context.check_hostname = serverproxy.check_hostname
ssl_options = ssl_context

# Set up default handler
Expand Down
6 changes: 6 additions & 0 deletions jupyter_server_proxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,9 @@ def _host_whitelist_default(self):
""",
config=True
)

check_hostname = Bool(
False,
help="Whether to check hostname.",
config=True
)

0 comments on commit 31033d3

Please sign in to comment.