We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e65587 commit 4b4036dCopy full SHA for 4b4036d
bin/cm.js
@@ -120,7 +120,11 @@ async function build() {
120
function startServer() {
121
let serve = join(root, "demo")
122
let moduleserver = new (require("esmoduleserve/moduleserver"))({root: serve, maxDepth: 2})
123
- let serveStatic = require("serve-static")(serve)
+ let serveStatic = require("serve-static")(serve, {
124
+ setHeaders(res, path) {
125
+ if (/try\/mods\//.test(path)) res.setHeader("Access-Control-Allow-Origin", "*")
126
+ }
127
+ })
128
require("http").createServer((req, resp) => {
129
if (/^\/test\/?($|\?)/.test(req.url)) {
130
let runTests = require("@codemirror/buildhelper/src/runtests")
0 commit comments