diff --git a/bin/http-server b/bin/http-server index a432dd3e4..ab0a6059c 100755 --- a/bin/http-server +++ b/bin/http-server @@ -24,6 +24,7 @@ if (argv.h || argv.help) { ' -i Display autoIndex [true]', ' -e --ext Default file extension if none supplied [none]', ' -s --silent Suppress log messages from output', + ' --contentType Define the content-type default value', ' --cors[=headers] Enable CORS via the "Access-Control-Allow-Origin" header', ' Optionally provide CORS headers list separated by commas', ' -o [path] Open browser window after starting the server', @@ -102,6 +103,10 @@ function listen(port) { proxy: proxy }; + if (argv.contentType) { + options.contentType = argv.contentType; + } + if (argv.cors) { options.cors = true; if (typeof argv.cors === 'string') {