Add missing content type header on compressed responses of /

This commit is contained in:
Andrew Berry 2019-06-28 10:02:05 -04:00
parent 027d83a88f
commit c99d9f6983
No known key found for this signature in database
GPG Key ID: 22C19D01CEBFC72B

View File

@ -156,7 +156,9 @@ async function serve(port: number, pathToSpec: string, options: Options = {}) {
},
);
} else if (request.url === '/') {
respondWithGzip(pageHTML, request, response);
respondWithGzip(pageHTML, request, response, {
'Content-Type': 'text/html',
});
} else if (request.url === '/spec.json') {
const specStr = JSON.stringify(spec, null, 2);
respondWithGzip(specStr, request, response, {