From 00ca731bbe340361112e87aad2abe9eb2d7603e0 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 6 May 2015 11:42:42 -0300 Subject: [PATCH] Use https for pentaho dependencies if necessary --- sigi/apps/saberes/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sigi/apps/saberes/views.py b/sigi/apps/saberes/views.py index ff8672e..96c7b5f 100644 --- a/sigi/apps/saberes/views.py +++ b/sigi/apps/saberes/views.py @@ -28,6 +28,8 @@ def get_dashboard_parts(dashboard_id, this_host): def make_dashboard(dashboard_id, adjust_content=lambda x: x): def view(request): headers, content = get_dashboard_parts(dashboard_id, request.META['HTTP_HOST']) + if request.is_secure: + headers = headers.replace('http://', 'https://') content = adjust_content(content) return render(request, 'saberes/dashboard.html', dict(headers=headers, content=content))