cloudhead / node-static

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

How do I set headers? #216

Closed blaasvaer closed 2 years ago

blaasvaer commented 5 years ago

How to I set headers for whatever file I'd like to serve?

brettz9 commented 3 years ago

I guess you mean per-file headers from the command line? If so, this feature does not exist. If you mean for all files, see https://github.com/cloudhead/node-static#headers-default-

And if you mean how to do so programmatically, you can serve for individual files with https://github.com/cloudhead/node-static#serving-specific-files or within your server you can call serve (or perhaps set up separate Server instances).

brettz9 commented 2 years ago

Closing as received no reply. Feel free to file a new issue as needed if the comment supplied did not address your concern.