mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-28 19:47:25 +00:00
fix(extension): support cross-origin media frames
This commit is contained in:
@@ -20,6 +20,13 @@ const TYPES = {
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
const requested = decodeURIComponent(new URL(req.url, 'http://localhost').pathname);
|
||||
if (requested === '/redirect/hidden-player') {
|
||||
res.writeHead(302, {
|
||||
Location: `http://127.0.0.1:${port}/pages/frames/player-frame-2.html?redirected=hidden`,
|
||||
'Cache-Control': 'no-store'
|
||||
}).end();
|
||||
return;
|
||||
}
|
||||
const filePath = path.resolve(root, `.${requested}`);
|
||||
|
||||
if (!filePath.startsWith(root + path.sep)) {
|
||||
|
||||
Reference in New Issue
Block a user