gun/sea/https.js
2018-06-26 13:06:29 -07:00

10 lines
292 B
JavaScript

var SEA = require('./root');
if(SEA.window){
if(location.protocol.indexOf('s') < 0
&& location.host.indexOf('localhost') < 0
&& location.protocol.indexOf('file:') < 0){
location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS!
}
}