mirror of
https://github.com/motion-canvas/motion-canvas.git
synced 2026-01-11 14:57:56 -05:00
fix(vite-plugin): add missing headers to html (#219)
This commit makes it possible to run Motion Canvas in GitHub Codespaces. Closes: #201
This commit is contained in:
@@ -297,12 +297,14 @@ export default ({
|
||||
}
|
||||
|
||||
if (req.url === '/') {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.end(createHtml('/@id/__x00__virtual:editor'));
|
||||
return;
|
||||
}
|
||||
|
||||
const name = req.url?.slice(1);
|
||||
if (name && name in projectLookup) {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.end(createHtml(`/@id/__x00__virtual:editor?project=${name}`));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user