Skip to content

Commit 3541734

Browse files
committed
Fix the HTML preview locally
In production we have a cloudflare rule that allows cross-origin requests. Without this the iframe does not render in Chrome.
1 parent e011f10 commit 3541734

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ const mainConfig = {
201201
"/pyodide/shims/pygal.js",
202202
"/PyodideWorker.js",
203203
].includes(req.url) ||
204-
req.url.startsWith("/scratch.html")
204+
req.url.startsWith("/scratch.html") ||
205+
req.url.startsWith("/html-renderer.html")
205206
) {
206207
res.setHeader("Cross-Origin-Resource-Policy", "cross-origin");
207208
}

0 commit comments

Comments
 (0)