mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 23:13:00 +00:00
Added configurable default server name attribute to better match behavior described for user-redirect in urls.md in the docs
This commit is contained in:
@@ -389,9 +389,14 @@ class User:
|
||||
Full name.domain/path if using subdomains, otherwise just my /base/url
|
||||
"""
|
||||
if self.settings.get('subdomain_host'):
|
||||
return '{host}{path}'.format(host=self.host, path=self.base_url)
|
||||
url = '{host}{path}'.format(host=self.host, path=self.base_url)
|
||||
else:
|
||||
return self.base_url
|
||||
url = self.base_url
|
||||
|
||||
if self.settings.get('default_server_name'):
|
||||
return url_path_join(url, self.settings.get('default_server_name'))
|
||||
else:
|
||||
return url
|
||||
|
||||
def server_url(self, server_name=''):
|
||||
"""Get the url for a server with a given name"""
|
||||
|
Reference in New Issue
Block a user