Serve the web development files with CORS enabled.

The server doubles as a host for trace files to be loaded by the web
version from another origin, for example when profiling over the
local network.
This commit is contained in:
Bartosz Taudul
2026-09-12 01:14:15 +02:00
parent 0d6916273b
commit 4332b43c3b

View File

@@ -9,6 +9,7 @@ class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler):
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
self.send_header("Pragma", "no-cache")
self.send_header("Expires", "0")
self.send_header("Access-Control-Allow-Origin", "*");
self.send_header("Cross-Origin-Embedder-Policy", "require-corp");
self.send_header("Cross-Origin-Opener-Policy", "same-origin");