1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

SESSION_COOKIE_SECURE and HTTP won't work

This commit is contained in:
Florent Daigniere 2021-10-08 10:17:03 +02:00
parent 7678365ab3
commit b48779ea70
2 changed files with 13 additions and 0 deletions

View File

@ -7,3 +7,15 @@
{%- block subtitle %}
{% trans %}to access the administration tools{% endtrans %}
{%- endblock %}
{%+ block content %}
{% if config["SESSION_COOKIE_SECURE"] %}
<script language="javascript">
if(window.location.protocol != "https:") {
document.write('<div class="alert alert-danger" role="alert">The login form has been disabled as <b>SESSION_COOKIE_SECURE</b> is on but you are accessing Mailu over HTTP</div>');
window.stop();
}
</script>
{% endif %}
{{ super() }}
{%+ endblock %}

View File

@ -0,0 +1 @@
Disable the login page if SESSION_COOKIE_SECURE is incompatible with how Mailu is accessed as this seems to be a common misconfiguration.