cloudhead / node-static

rfc 2616 compliant HTTP static-file server module, with built-in caching.
MIT License
2.17k stars 245 forks source link

Cannot change "Content-Type:" header #200

Open Sterpa opened 7 years ago

Sterpa commented 7 years ago

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?

brettz9 commented 5 years ago

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.