Update index.js

This commit is contained in:
Nicholas Jitkoff 2022-09-07 23:11:04 -07:00
parent bbde578058
commit 7f7634a40d

View file

@ -408,8 +408,9 @@
src = params.script;
}
let sandbox = params.renderer?.sandbox;
if (sandbox == "none") { // passthrough
} else if (sandbox == "hash") { // Generate sandbox based off of body hash
// if (sandbox == "none") { // passthrough
// } else
if (sandbox == "hash") { // Generate sandbox based off of body hash
let hash = await bitty.hashString(params.body);
src = src.replace("https://", "https://script-" + hash + ".");
} else if (sandbox) { // Use named sandbox