gun/sea/https.js
2018-04-07 13:50:53 -07:00

10 lines
250 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:';
}
}