@cloudbase/cals 1.2.21 → 1.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -496,6 +496,7 @@ function loadProdMetaScript(bundleName, filename) {
496
496
  try {
497
497
  const iframe = document.createElement('iframe');
498
498
  iframe.setAttribute('sandbox', 'allow-scripts');
499
+ iframe.setAttribute('allow', 'local-network-access');
499
500
  iframe.style.position = 'absolute'; // 脱离文档流
500
501
  iframe.style.left = '-9999px'; // 移到屏幕左侧很远的地方
501
502
  iframe.style.top = '-9999px'; // 移到屏幕上方很远的地方
@@ -551,7 +552,7 @@ function loadProdMetaScript(bundleName, filename) {
551
552
  ' document.body.appendChild(script);\n' +
552
553
  '});\n';
553
554
  const scriptOrigin = new URL(filename).origin;
554
- const csp = `default-src 'none'; script-src 'unsafe-inline' ${scriptOrigin};`;
555
+ const csp = `default-src 'none'; script-src 'unsafe-inline' 'unsafe-eval' ${scriptOrigin};`;
555
556
  iframe.srcdoc = `
556
557
  <html>
557
558
  <head>
@@ -492,6 +492,7 @@ function loadProdMetaScript(bundleName, filename) {
492
492
  try {
493
493
  const iframe = document.createElement('iframe');
494
494
  iframe.setAttribute('sandbox', 'allow-scripts');
495
+ iframe.setAttribute('allow', 'local-network-access');
495
496
  iframe.style.position = 'absolute'; // 脱离文档流
496
497
  iframe.style.left = '-9999px'; // 移到屏幕左侧很远的地方
497
498
  iframe.style.top = '-9999px'; // 移到屏幕上方很远的地方
@@ -547,7 +548,7 @@ function loadProdMetaScript(bundleName, filename) {
547
548
  ' document.body.appendChild(script);\n' +
548
549
  '});\n';
549
550
  const scriptOrigin = new URL(filename).origin;
550
- const csp = `default-src 'none'; script-src 'unsafe-inline' ${scriptOrigin};`;
551
+ const csp = `default-src 'none'; script-src 'unsafe-inline' 'unsafe-eval' ${scriptOrigin};`;
551
552
  iframe.srcdoc = `
552
553
  <html>
553
554
  <head>