Skip to content

Commit

Permalink
Add Content-Type to manager index to prevent reliance on content type…
Browse files Browse the repository at this point in the history
… sniffing
  • Loading branch information
GCHQDeveloper548 committed Feb 20, 2025
1 parent 0aa2e8c commit 87eb608
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/core/src/builder-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
router.use('/', ({ url }, res, next) => {
if (url && isRootPath.test(url)) {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/html');
res.write(html);
res.end();
} else {
Expand All @@ -219,6 +220,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
});
router.use(`/index.html`, (req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/html');
res.write(html);
res.end();
});
Expand Down

0 comments on commit 87eb608

Please sign in to comment.