From e8680920641d4df834a8c29a5f31173d747e294f Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Mon, 7 Nov 2022 15:19:45 +0100 Subject: [PATCH] Fix: Add protocol setting [VIPSUTV-348] --- VIPSWeb/local_settings_sample.py | 3 +++ VIPSWeb/templates/base.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VIPSWeb/local_settings_sample.py b/VIPSWeb/local_settings_sample.py index b2a9ae4f..3933e7ee 100755 --- a/VIPSWeb/local_settings_sample.py +++ b/VIPSWeb/local_settings_sample.py @@ -118,6 +118,9 @@ GOOGLE_ANALYTICS_SCRIPT = """ </script> """ +# Convenience method for building URL to self +VIPSWEB_PROTOCOL = "https" + # The server hostname used for VIPSLogic VIPSLOGIC_SERVER_NAME = "vipslogic" # VIPSLogic protocol (http or https) diff --git a/VIPSWeb/templates/base.html b/VIPSWeb/templates/base.html index 20ce4ecd..5cae714a 100755 --- a/VIPSWeb/templates/base.html +++ b/VIPSWeb/templates/base.html @@ -99,7 +99,7 @@ <span class="fa fa-sign-out"></span> </a> {% else %} - <a href="{{settings.VIPSLOGIC_PROTOCOL}}://{{settings.VIPSLOGIC_SERVER_NAME}}/login?nextPage={{"http://" | urlencode}}{{request.get_host|urlencode}}&returnUUID=true" class="signinLink">{% trans "Sign in" %}</a> + <a href="{{settings.VIPSLOGIC_PROTOCOL}}://{{settings.VIPSLOGIC_SERVER_NAME}}/login?nextPage={{settings.VIPSWEB_PROTOCOL}}{{"://" | urlencode}}{{request.get_host|urlencode}}&returnUUID=true" class="signinLink">{% trans "Sign in" %}</a> {% endif %} </div> </div> -- GitLab