https.js 292 B

12345678910
  1. var SEA = require('./root');
  2. 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. }