Skip to content

Commit

Permalink
adding optional nosniff header
Browse files Browse the repository at this point in the history
  • Loading branch information
adl-trey committed Sep 20, 2023
1 parent ed330a6 commit b8ae1d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ if (process.env.INCLUDE_STRICT_TRANSPORT_SECURITY_HEADER == "true") {
});
}

if (process.env.INCLUDE_MIME_NOSNIFF_HEADER == "true") {
app.use((req, res, next) => {
res.setHeader("X-Content-Type-Options", "nosniff");
next();
});
}

let v8 = require('v8');
let glob = require('glob');
let path = require('path');
Expand Down

0 comments on commit b8ae1d4

Please sign in to comment.