From 98f0005d6775651d5d35b18f871087e965db207e Mon Sep 17 00:00:00 2001 From: Tom Price Date: Tue, 21 Apr 2015 19:31:33 +0100 Subject: [PATCH] Add checking URL is secure before using HTTPS for ical requests. In practice, this will always be yes. --- RIGS/templates/RIGS/profile_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIGS/templates/RIGS/profile_detail.html b/RIGS/templates/RIGS/profile_detail.html index 1e7174f6..c40edfed 100644 --- a/RIGS/templates/RIGS/profile_detail.html +++ b/RIGS/templates/RIGS/profile_detail.html @@ -63,7 +63,7 @@
Calendar URL
{% if user.api_key %} -
https://{{ request.get_host }}{% url 'ics_calendar' api_pk=user.pk api_key=user.api_key %}
+
http{{ request.is_secure|yesno:"s,"}}://{{ request.get_host }}{% url 'ics_calendar' api_pk=user.pk api_key=user.api_key %}
{% else %}
No API Key Generated
{% endif %}