add cors to all /lib paths to make safari happy in dev mode
This commit is contained in:
parent
371372a195
commit
3e85a2c8f8
1 changed files with 10 additions and 7 deletions
17
app.js
17
app.js
|
|
@ -579,16 +579,19 @@ function cookieValue(cookie,key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addAppHeaders(req, res, next) {
|
function addAppHeaders(req, res, next) {
|
||||||
|
if (req.app.path.indexOf("/lib") === 0) {
|
||||||
|
addCorsHeaders(req, res);
|
||||||
|
} else
|
||||||
if ([
|
if ([
|
||||||
"/kiri/",
|
"/kiri/",
|
||||||
"/mesh/",
|
"/mesh/",
|
||||||
"/lib/gpu/raster.js",
|
// "/lib/gpu/raster.js",
|
||||||
"/lib/gpu/raster-worker.js",
|
// "/lib/gpu/raster-worker.js",
|
||||||
"/lib/mesh/work.js",
|
// "/lib/mesh/work.js",
|
||||||
"/lib/kiri/run/worker.js",
|
// "/lib/kiri/run/worker.js",
|
||||||
"/lib/kiri/run/minion.js",
|
// "/lib/kiri/run/minion.js",
|
||||||
"/lib/kiri/run/engine.js",
|
// "/lib/kiri/run/engine.js",
|
||||||
"/lib/kiri/run/frame.js"
|
// "/lib/kiri/run/frame.js"
|
||||||
].indexOf(req.app.path) >= 0) {
|
].indexOf(req.app.path) >= 0) {
|
||||||
addCorsHeaders(req, res);
|
addCorsHeaders(req, res);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue