Skip to content

Commit

Permalink
tests(smokehouse): set Content-Type for images served by static-serve…
Browse files Browse the repository at this point in the history
…r.js (#7612)
  • Loading branch information
connorjclark committed Mar 21, 2019
1 parent 4b43b8e commit 0bc8eaf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lighthouse-cli/test/fixtures/static-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ function requestHandler(request, response) {
headers['Content-Type'] = 'text/css';
} else if (filePath.endsWith('.svg')) {
headers['Content-Type'] = 'image/svg+xml';
} else if (filePath.endsWith('.png')) {
headers['Content-Type'] = 'image/png';
} else if (filePath.endsWith('.gif')) {
headers['Content-Type'] = 'image/gif';
} else if (filePath.endsWith('.jpg') || filePath.endsWith('.jpeg')) {
headers['Content-Type'] = 'image/jpeg';
}

let delay = 0;
Expand Down

0 comments on commit 0bc8eaf

Please sign in to comment.