Skip to content

Commit c57f16f

Browse files
Merge pull request #30606 from GCHQDeveloper548/GCHQDeveloper548/root-content-type-fix-30453
Manager: Add Content-Type to prevent reliance on content type sniffing, fixing Cloud IDEs
2 parents f4dbc30 + 7edb1d2 commit c57f16f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

code/core/src/builder-manager/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
206206
router.use('/', ({ url }, res, next) => {
207207
if (url && isRootPath.test(url)) {
208208
res.statusCode = 200;
209+
res.setHeader('Content-Type', 'text/html');
209210
res.write(html);
210211
res.end();
211212
} else {
@@ -214,6 +215,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
214215
});
215216
router.use(`/index.html`, (req, res) => {
216217
res.statusCode = 200;
218+
res.setHeader('Content-Type', 'text/html');
217219
res.write(html);
218220
res.end();
219221
});

0 commit comments

Comments
 (0)