Changeset 63bc1c in indico


Ignore:
Timestamp:
03/16/11 18:44:26 (2 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 4c7d4152dff271ba5df5a8606605969cab454080
Children:
84506a
Parents:
9f305e
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (03/16/11 18:25:21)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (03/16/11 18:44:26)
Message:

[FIX] SSLify all URLs in Indico.Urls when using SSL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/htdocs/js/indico/Core/Components.js

    r05644d r63bc1c  
    1919    indicoRequest = curry(jsonRpc, Indico.Urls.SecureJsonRpcService); 
    2020    imageSrc = imageFunctionGenerator(Indico.Urls.SecureImagesBase); 
    21     Indico.Urls.JsonRpcService = Indico.Urls.SecureJsonRpcService; 
     21 
     22    function fixUrls(urls) { 
     23        for(var key in urls) { 
     24            // not a string -> assume object and recurse 
     25            if(urls[key].replace === undefined) { 
     26                fixUrls(urls[key]); 
     27                continue; 
     28            } 
     29 
     30            // skip if the url starts with https 
     31            if(urls[key].indexOf('https:') === 0) { 
     32                continue; 
     33            } 
     34 
     35            urls[key] = urls[key].replace(/^http:/, 'https:'); 
     36        } 
     37    } 
     38 
     39    fixUrls(Indico.Urls); 
    2240} else { 
    2341    indicoSource = curry(jsonRpcValue, Indico.Urls.JsonRpcService); 
Note: See TracChangeset for help on using the changeset viewer.