From da5d2fb008f6c0d425859c3e1f63942959a33493 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 28 Oct 2010 19:04:33 -0500 Subject: Always use HTTPS for jQuery Signed-off-by: Dan McGee --- main/templatetags/cdn.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main/templatetags/cdn.py b/main/templatetags/cdn.py index 43a7f4bc..83ee61fb 100644 --- a/main/templatetags/cdn.py +++ b/main/templatetags/cdn.py @@ -9,14 +9,12 @@ def jquery(parser, token): class JQueryNode(template.Node): def render(self, context): - # serve content from HTTPS if we know this request is secure - secure = 'secure' in context and context['secure'] prefixes = { False: 'http', True: 'https' } version = '1.4.3' oncdn = getattr(settings, 'CDN_ENABLED', True) if oncdn: - jquery = '%s://ajax.googleapis.com/ajax/libs/jquery/' \ - '%s/jquery.min.js' % (prefixes[secure], version) + jquery = 'https://ajax.googleapis.com/ajax/libs/jquery/' \ + '%s/jquery.min.js' % version else: jquery = '/media/jquery-%s.min.js' % version return '' % jquery -- cgit v1.2.3-55-g3dc8