diff options
author | Dan McGee <dan@archlinux.org> | 2011-11-08 13:55:38 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-11-08 13:55:38 -0600 |
commit | 886630dd4e65a7be6d1bd3d8a0e70ab24e5affc6 (patch) | |
tree | 6022547f146db5487fdc09c5d93e2b9b726befa2 /main | |
parent | 28f72db7be7bf2f54d734c78422e6179f0ce29f1 (diff) |
Always use same URL for both secure and non-secure CDN requests
Use a scheme-relative URL rather than serving different content to
users based on HTTP or HTTPS. Should prevent mismatched certificate
errors.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r-- | main/templatetags/cdn.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/main/templatetags/cdn.py b/main/templatetags/cdn.py index c25040c0..5cb12fcf 100644 --- a/main/templatetags/cdn.py +++ b/main/templatetags/cdn.py @@ -23,12 +23,7 @@ class CDNPrefixNode(template.Node): oncdn = getattr(settings, 'CDN_ENABLED', True) if not oncdn: return '' - secure = 'secure' in context and context['secure'] # if left undefined, same behavior as if CDN is turned off - paths = { - False: getattr(settings, 'CDN_PATH', ''), - True: getattr(settings, 'CDN_PATH_SECURE', ''), - } - return paths[secure] + return getattr(settings, 'CDN_PATH', '') # vim: set ts=4 sw=4 et: |