node-static icon indicating copy to clipboard operation
node-static copied to clipboard

Cannot change "Content-Type:" header

Open Sterpa opened this issue 8 years ago • 1 comments

Hi, i cannot change "Content-Type:" header with command $ static -H '{"Content-Type": "text/html;charset=UTF-8"}' to switch-on UTF-8

node-static do not remember new Content-Type value, it use only "text/html"

What's wrong? It's a bug?

Sterpa avatar Sep 29 '17 13:09 Sterpa

Independent of this apparent issue, on a related matter, it would be nice to have an option to set a charset on any content-type header so that other files like JavaScript could have a default of UTF-8 set by command line as well. Besides the need for those who use non-ASCII characters, viewing these files without such information can give annoying warnings in console.

brettz9 avatar Oct 20 '18 12:10 brettz9