workerboxjs
Advanced tools
Comparing version 1.5.0 to 2.0.0
@@ -8,3 +8,3 @@ let workerBoxCount = 0; | ||
scriptUrl = scriptUrl + '/v1.5.0/'; | ||
scriptUrl = scriptUrl + '/v2.0.0/'; | ||
try { | ||
@@ -16,6 +16,9 @@ scriptUrl = new URL(scriptUrl); | ||
'createWorkerBox must be given a remote sandbox server to isolate unsafe code.', | ||
'a free hosted version is available at https://sandbox.workerbox.net/' | ||
'a free hosted version is available at https://workerbox.net/' | ||
].join('\n')); | ||
} | ||
const subdomain = [...Array(30)].map(() => Math.random().toString(36)[2]).join(''); | ||
scriptUrl.host = `${subdomain}.${scriptUrl.host}` | ||
workerBoxCount = workerBoxCount + 1; | ||
@@ -22,0 +25,0 @@ return new Promise(resolve => { |
{ | ||
"name": "workerboxjs", | ||
"version": "1.5.0", | ||
"version": "2.0.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "A secure sandbox to execute untrusted user JavaScript, in a web browser, without any risk to your own domain/site/page.", |
@@ -5,3 +5,3 @@ # WorkerBox | ||
## Installation | ||
To ensure the untrusted code can not access any cookies, localStorage or other permissions that have been given to your site, it's important the evaluator is run on a domain completely separate from your own site. | ||
To ensure the untrusted code can not access any data, permissions, that have been given to your site, it's important the evaluator is run on a domain completely separate from your own site. | ||
@@ -19,3 +19,3 @@ The separate domain code is located in the [`./server`](./server) folder of this repo. You can host it yourself, but make sure it's on another domain, or feel free to use the default one for free at [https://workerbox.net/](https://workerbox.net/). | ||
const run = await createWorkerBox('https://sandbox.workerbox.net/'); | ||
const run = await createWorkerBox('https://workerbox.net/'); | ||
@@ -22,0 +22,0 @@ const result = await run(` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3574
49