diff --git a/jupyterhub/app.py b/jupyterhub/app.py index bc04b31f..324656f4 100644 --- a/jupyterhub/app.py +++ b/jupyterhub/app.py @@ -1185,10 +1185,6 @@ class JupyterHub(Application): False, help="""Shuts down all user servers on logout""" ).tag(config=True) - server_tokens = Bool( - True, help="""Display JupyterHub version information on admin page""" - ).tag(config=True) - @default('statsd') def _statsd(self): if self.statsd_host: @@ -2137,7 +2133,6 @@ class JupyterHub(Application): internal_ssl_ca=self.internal_ssl_ca, trusted_alt_names=self.trusted_alt_names, shutdown_on_logout=self.shutdown_on_logout, - server_tokens=self.server_tokens, eventlog=self.eventlog, ) # allow configured settings to have priority diff --git a/jupyterhub/handlers/pages.py b/jupyterhub/handlers/pages.py index 8b0afa3d..509efd08 100644 --- a/jupyterhub/handlers/pages.py +++ b/jupyterhub/handlers/pages.py @@ -423,7 +423,6 @@ class AdminHandler(BaseHandler): sort={s: o for s, o in zip(sorts, orders)}, allow_named_servers=self.allow_named_servers, named_server_limit_per_user=self.named_server_limit_per_user, - server_tokens=self.settings.get('server_tokens', True), server_version='{} {}'.format(__version__, self.version_hash), ) self.finish(html) diff --git a/jupyterhub/tests/test_pages.py b/jupyterhub/tests/test_pages.py index 3b8f242a..d5d31978 100644 --- a/jupyterhub/tests/test_pages.py +++ b/jupyterhub/tests/test_pages.py @@ -117,14 +117,6 @@ async def test_admin_version(app): assert "version_footer" in r.text -async def test_admin_version_disabled(app): - cookies = await app.login_user('admin') - with mock.patch.dict(app.tornado_settings, {'server_tokens': False}): - r = await get_page('admin', app, cookies=cookies, allow_redirects=False) - r.raise_for_status() - assert "version_footer" not in r.text - - @pytest.mark.parametrize('sort', ['running', 'last_activity', 'admin', 'name']) async def test_admin_sort(app, sort): cookies = await app.login_user('admin') diff --git a/share/jupyterhub/templates/admin.html b/share/jupyterhub/templates/admin.html index f5ddec4a..a0c6fb87 100644 --- a/share/jupyterhub/templates/admin.html +++ b/share/jupyterhub/templates/admin.html @@ -103,13 +103,11 @@ -{%- if server_tokens -%} -