| 1 | { |
| 2 | "schema": 1, |
| 3 | "note": "Single source of the sandbox documents' headers. sandbox/x2/headers.mjs turns it into nginx snippets and into the headers the test server sends. {sandbox} is the sandbox origin, {code} the space-separated Code origins, {self-script} the document's pinned inline-script hash. No fetch directive may name a host.", |
| 4 | "environments": { |
| 5 | "production": { |
| 6 | "code": [ |
| 7 | "https://code.elffuss.com" |
| 8 | ], |
| 9 | "sandbox": "https://x2.utopiaia.com" |
| 10 | }, |
| 11 | "dev": { |
| 12 | "code": [ |
| 13 | "http://127.0.0.1:{port}" |
| 14 | ], |
| 15 | "sandbox": "http://localhost:{port}" |
| 16 | } |
| 17 | }, |
| 18 | "common": { |
| 19 | "Permissions-Policy": "accelerometer=(), ambient-light-sensor=(), attribution-reporting=(), autoplay=(), bluetooth=(), browsing-topics=(), camera=(), clipboard-read=(), clipboard-write=(), compute-pressure=(), display-capture=(), encrypted-media=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), local-fonts=(), local-network-access=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), storage-access=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()", |
| 20 | "Referrer-Policy": "no-referrer", |
| 21 | "X-Content-Type-Options": "nosniff", |
| 22 | "X-DNS-Prefetch-Control": "off", |
| 23 | "Origin-Agent-Cluster": "?1", |
| 24 | "Cache-Control": "no-cache", |
| 25 | "Content-Type": "text/html; charset=utf-8" |
| 26 | }, |
| 27 | "documents": { |
| 28 | "sandbox.html": { |
| 29 | "path": "/x2/v1/sandbox.html", |
| 30 | "query": "^$", |
| 31 | "inlineScript": "sha256-/luUDdba82j70NvkxS1nxDvTfjxLjRfnpKE6sqiin3U=", |
| 32 | "csp": [ |
| 33 | "default-src 'none'", |
| 34 | "script-src {self-script} blob: 'wasm-unsafe-eval'", |
| 35 | "worker-src blob:", |
| 36 | "child-src blob:", |
| 37 | "frame-src {sandbox}/x2/v1/exthost-iframe.html", |
| 38 | "connect-src blob: data:", |
| 39 | "img-src blob: data:", |
| 40 | "font-src blob: data:", |
| 41 | "style-src 'unsafe-inline'", |
| 42 | "media-src 'none'", |
| 43 | "object-src 'none'", |
| 44 | "manifest-src 'none'", |
| 45 | "base-uri 'none'", |
| 46 | "form-action 'none'", |
| 47 | "frame-ancestors {code}" |
| 48 | ], |
| 49 | "metaFrameSrc": "'self'" |
| 50 | }, |
| 51 | "exthost-iframe.html": { |
| 52 | "path": "/x2/v1/exthost-iframe.html", |
| 53 | "query": "^parentOrigin={sandbox-uri}&vscodeWebWorkerExtHostId=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", |
| 54 | "inlineScript": "sha256-2EBQn+AFduI8Wb0riLwbeshEGP4dJlHornyvuFAgYnA=", |
| 55 | "library": "@codingame/monaco-vscode-extensions-service-override/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html", |
| 56 | "csp": [ |
| 57 | "default-src 'none'", |
| 58 | "script-src {self-script} blob: 'unsafe-eval' 'wasm-unsafe-eval'", |
| 59 | "worker-src blob:", |
| 60 | "child-src blob:", |
| 61 | "connect-src blob: data:", |
| 62 | "img-src blob: data:", |
| 63 | "font-src blob: data:", |
| 64 | "media-src 'none'", |
| 65 | "object-src 'none'", |
| 66 | "manifest-src 'none'", |
| 67 | "base-uri 'none'", |
| 68 | "form-action 'none'", |
| 69 | "frame-ancestors 'self' {code}" |
| 70 | ] |
| 71 | } |
| 72 | } |
| 73 | } |