diff --git a/sea.js b/sea.js index c25ab5d7..2bcb0a26 100644 --- a/sea.js +++ b/sea.js @@ -35,7 +35,9 @@ 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){ + console.warn('WebCrypto used by GUN SEA implementation does not work without HTTPS. Will automatically redirect.') location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS! } } }catch(e){}