Skip to content

Commit

Permalink
sea blobs! (#1353)
Browse files Browse the repository at this point in the history
* sea blobs!

* and null origins

* null fix

* null check is last
  • Loading branch information
bmatusiak committed Jan 17, 2024
1 parent 203bd40 commit e07c9b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sea.js
Expand Up @@ -37,7 +37,9 @@
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!
}
Expand Down

0 comments on commit e07c9b2

Please sign in to comment.