From c99d9f698310713e88fb431e3f4ee0a3a4e90d9d Mon Sep 17 00:00:00 2001 From: Andrew Berry Date: Fri, 28 Jun 2019 10:02:05 -0400 Subject: [PATCH] Add missing content type header on compressed responses of / --- cli/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/index.ts b/cli/index.ts index c91fb93f..67f7faad 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -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, {