host-based routing doesn't support wildcards

This commit is contained in:
Min RK
2018-07-03 12:27:13 +02:00
parent 89e6c2110e
commit b0ba51f209

View File

@@ -1111,10 +1111,13 @@ class JupyterHub(Application):
# routespec for the Hub is the *app* base url # routespec for the Hub is the *app* base url
# not the hub URL, so it receives requests for non-running servers # not the hub URL, so it receives requests for non-running servers
# use `/` with host-based routing so the Hub
# gets requests for all hosts
host = '' host = ''
if self.subdomain_host: if self.subdomain_host:
host = urlparse(self.subdomain_host).hostname routespec = '/'
routespec = host + self.base_url else:
routespec = self.base_url
self.hub = Hub(routespec=routespec, **hub_args) self.hub = Hub(routespec=routespec, **hub_args)