mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 07:53:00 +00:00
Merge pull request #609 from minrk/only-relevant-warning
hide http warning until it's relevant
This commit is contained in:
@@ -22,9 +22,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class='auth-form-body'>
|
<div class='auth-form-body'>
|
||||||
|
|
||||||
<p id='insecure-login-warning'>
|
<p id='insecure-login-warning' class='hidden'>
|
||||||
Warning: JupyterHub seems to be served over an unsecured HTTP connection.
|
Warning: JupyterHub seems to be served over an unsecured HTTP connection.
|
||||||
We strongly recommend enabling TLS for JupyterHub.
|
We strongly recommend enabling HTTPS for JupyterHub.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if login_error %}
|
{% if login_error %}
|
||||||
@@ -72,8 +72,10 @@
|
|||||||
{{super()}}
|
{{super()}}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
if (window.location.protocol === "https:") {
|
if (window.location.protocol === "http:") {
|
||||||
var warnings = document.getElementById('insecure-login-warning').remove()
|
// unhide http warning
|
||||||
|
var warning = document.getElementById('insecure-login-warning');
|
||||||
|
warning.className = warning.className.replace(/\bhidden\b/, '');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user