set X-Content-Type-Options to nosniff on serve
This commit is contained in:
parent
2908df42de
commit
86a0417947
1 changed files with 4 additions and 1 deletions
|
@ -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":
|
||||
|
|
Loading…
Reference in a new issue