mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Parameters: the version is exposed in http header only when configured
Currently the version is exposed in a 'Server' http headers. This commit allows to parameterize it in the settings. By defaults it is not exposed. Fixes #3423
This commit is contained in:
parent
8453f07205
commit
28a6f505c5
3 changed files with 20 additions and 1 deletions
|
@ -408,6 +408,13 @@
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expose Etherpad version in the Server http header.
|
||||||
|
*
|
||||||
|
* Do not enable on production machines.
|
||||||
|
*/
|
||||||
|
"exposeVersion": false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The log level we are using.
|
* The log level we are using.
|
||||||
*
|
*
|
||||||
|
|
|
@ -75,7 +75,12 @@ exports.restartServer = function () {
|
||||||
// Stop IE going into compatability mode
|
// Stop IE going into compatability mode
|
||||||
// https://github.com/ether/etherpad-lite/issues/2547
|
// https://github.com/ether/etherpad-lite/issues/2547
|
||||||
res.header("X-UA-Compatible", "IE=Edge,chrome=1");
|
res.header("X-UA-Compatible", "IE=Edge,chrome=1");
|
||||||
|
|
||||||
|
// send git version in the Server response header if exposeVersion is true.
|
||||||
|
if (settings.exposeVersion) {
|
||||||
res.header("Server", serverName);
|
res.header("Server", serverName);
|
||||||
|
}
|
||||||
|
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -291,6 +291,13 @@ exports.scrollWhenFocusLineIsOutOfViewport = {
|
||||||
"scrollWhenCaretIsInTheLastLineOfViewport": false
|
"scrollWhenCaretIsInTheLastLineOfViewport": false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expose Etherpad version in the Server http header.
|
||||||
|
*
|
||||||
|
* Do not enable on production machines.
|
||||||
|
*/
|
||||||
|
exports.exposeVersion = false;
|
||||||
|
|
||||||
// checks if abiword is avaiable
|
// checks if abiword is avaiable
|
||||||
exports.abiwordAvailable = function()
|
exports.abiwordAvailable = function()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue