set X-Content-Type-Options to nosniff on serve

This commit is contained in:
bill bittner 2017-06-14 13:11:42 -07:00
parent 2908df42de
commit 86a0417947

View file

@ -1,7 +1,10 @@
function serveFile(fileInfo, res){
var options = {
root: fileInfo.directory,
headers: { "Content-Type": fileInfo.contentType}
headers: {
"X-Content-Type-Options": "nosniff",
"Content-Type": fileInfo.contentType
}
};
switch (fileInfo.contentType){
case "image/jpeg":