mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 23:42:59 +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:
@@ -2,6 +2,11 @@
|
|||||||
display: table;
|
display: table;
|
||||||
height: 80vh;
|
height: 80vh;
|
||||||
|
|
||||||
|
& #insecure-login-warning{
|
||||||
|
.bg-warning();
|
||||||
|
padding:10px;
|
||||||
|
}
|
||||||
|
|
||||||
.service-login {
|
.service-login {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
@@ -21,6 +21,12 @@
|
|||||||
Sign in
|
Sign in
|
||||||
</div>
|
</div>
|
||||||
<div class='auth-form-body'>
|
<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 %}
|
{% if login_error %}
|
||||||
<p class="login_error">
|
<p class="login_error">
|
||||||
{{login_error}}
|
{{login_error}}
|
||||||
@@ -65,4 +71,10 @@
|
|||||||
{% block script %}
|
{% block script %}
|
||||||
{{super()}}
|
{{super()}}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
if (window.location.protocol === "https:") {
|
||||||
|
var warnings = document.getElementById('insecure-login-warning').remove()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Reference in New Issue
Block a user