summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-03-14 19:03:20 -0300
committerJohn McLear <john@mclear.co.uk>2013-03-14 19:03:20 -0300
commitffe7e65db64a92abb193ae161bec121c51a0298b (patch)
tree64f7248a2aa490c9cf5dfea14a39a21fc06a042a
parent5d12be940c6ed3062637be0f940a25f92702fb71 (diff)
downloadetherpad-lite-ffe7e65db64a92abb193ae161bec121c51a0298b.zip
allow strict transport if ssl is on and stop x-frame-options, this might break embedded pads, please test
-rw-r--r--src/node/hooks/express.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/node/hooks/express.js b/src/node/hooks/express.js
index 34baca40..7e9546c2 100644
--- a/src/node/hooks/express.js
+++ b/src/node/hooks/express.js
@@ -27,7 +27,7 @@ exports.createServer = function () {
}
console.log("Report bugs at https://github.com/ether/etherpad-lite/issues")
- serverName = "Etherpad-Lite " + version + " (http://etherpad.org)";
+ serverName = "Etherpad " + version + " (http://etherpad.org)";
exports.restartServer();
@@ -71,6 +71,11 @@ exports.restartServer = function () {
}
app.use(function (req, res, next) {
+ res.header("X-Frame-Options", "deny");
+ if(settings.ssl){ // if we use SSL
+ res.header("X-Frame-Options", "max-age=31536000; includeSubDomains");
+ }
+
res.header("Server", serverName);
next();
});