Wrap web worker extension host in an iframe to get a different origin

This commit is contained in:
Alex Dima
2020-08-03 14:52:53 +02:00
parent 532c7b1c78
commit f43a17578c
5 changed files with 238 additions and 69 deletions

View File

@@ -254,7 +254,9 @@ async function handleBuiltInExtension(req, res, parsedUrl) {
if (!filePath) {
return serveError(req, res, 400, `Bad request.`);
}
return serveFile(req, res, filePath);
return serveFile(req, res, filePath, {
'Access-Control-Allow-Origin': '*'
});
}
/**