https.js 309 B

12345678910
  1. var SEA = require('./root');
  2. try{ if(SEA.window){
  3. if(location.protocol.indexOf('s') < 0
  4. && location.host.indexOf('localhost') < 0
  5. && location.protocol.indexOf('file:') < 0){
  6. location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS!
  7. }
  8. } }catch(e){}