mirror of
https://github.com/amark/gun.git
synced 2026-03-15 04:45:19 +00:00
have unbuild function wrap to prevent scope leaks & allow RETURN hehehe so I can reject @bmatusiak 's lS change O:) O:) I love you you're a hero!
later with @bmatusiak check sea.then for '../gun.js' vs '../' vs ... note: src/index -> core.js TODO: something about WebRTC candidates hitting ack decrement limits?
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
;(function(){
|
||||
|
||||
var SEA = require('./root');
|
||||
try{ if(SEA.window){
|
||||
if(location.protocol.indexOf('s') < 0
|
||||
&& location.host.indexOf('localhost') < 0
|
||||
&& ! /^127\.\d+\.\d+\.\d+$/.test(location.hostname)
|
||||
&& location.protocol.indexOf('file:') < 0){
|
||||
&& location.protocol.indexOf('blob:') < 0
|
||||
&& location.protocol.indexOf('file:') < 0
|
||||
&& location.origin != 'null'){
|
||||
console.warn('HTTPS needed for WebCrypto in SEA, redirecting...');
|
||||
location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS!
|
||||
}
|
||||
} }catch(e){}
|
||||
|
||||
|
||||
}());
|
||||
Reference in New Issue
Block a user