mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
Merge pull request #1619 from ether/stricter-transport
Enable HSTS on TLS connections
This commit is contained in:
commit
c627608ea5
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@ exports.restartServer = function () {
|
|||
}
|
||||
|
||||
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);
|
||||
next();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue