revert request.url.scheme parse change

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-01-15 19:43:41 -08:00
parent ef46a8615b
commit 2a328e34a4
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -18,7 +18,7 @@
</p> </p>
</form> </form>
{% else %} {% else %}
{% if request.headers.get("X-Forwarded-Proto", "http") and config.getboolean("options", "disable_http_login") %} {% if request.url.scheme == "http" and config.getboolean("options", "disable_http_login") %}
{% set https_login = url_base.replace("http://", "https://") + "/login" %} {% set https_login = url_base.replace("http://", "https://") + "/login" %}
<p> <p>
{{ "HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login." {{ "HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login."