mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
Add a warning on login if page not over ssl.
The --no-ssl option in the backend make sens, but still too many deployment are not over SSL because they underestimate / do not understand the risks.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
#login-main {
|
||||
display: table;
|
||||
height: 80vh;
|
||||
|
||||
& #insecure-login-warning{
|
||||
.bg-warning();
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.service-login {
|
||||
text-align: center;
|
||||
|
@@ -21,6 +21,12 @@
|
||||
Sign in
|
||||
</div>
|
||||
<div class='auth-form-body'>
|
||||
|
||||
<p id='insecure-login-warning'>
|
||||
Warning: JupyterHub seems to be served over an unsecured HTTP connection.
|
||||
We strongly recommend enabling TLS for JupyterHub.
|
||||
</p>
|
||||
|
||||
{% if login_error %}
|
||||
<p class="login_error">
|
||||
{{login_error}}
|
||||
@@ -65,4 +71,10 @@
|
||||
{% block script %}
|
||||
{{super()}}
|
||||
|
||||
<script>
|
||||
if (window.location.protocol === "https:") {
|
||||
var warnings = document.getElementById('insecure-login-warning').remove()
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user