Skip to content

Commit

Permalink
fix(cli): Add missing content type header on compressed responses of /
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy authored Jul 29, 2019
2 parents ac41f0b + c99d9f6 commit f724813
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit f724813

Please sign in to comment.