Merge pull request #1619 from ether/stricter-transport

Enable HSTS on TLS connections
pull/2184/head
John McLear 2014-06-17 12:58:47 +01:00
commit c627608ea5
1 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,11 @@ exports.restartServer = function () {
} }
app.use(function (req, res, next) { app.use(function (req, res, next) {
// res.header("X-Frame-Options", "deny"); // breaks embedded pads
if(settings.ssl){ // if we use SSL
res.header("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
}
res.header("Server", serverName); res.header("Server", serverName);
next(); next();
}); });