mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Add server.xsrf.token as a deprecated config. Closes #5635.
Fixes #5641
This commit is contained in:
parent
8d8b7dd21b
commit
a06807f94c
2 changed files with 9 additions and 0 deletions
|
@ -35,6 +35,10 @@ let legacySettingMap = {
|
|||
verify_ssl: 'elasticsearch.ssl.verify',
|
||||
};
|
||||
|
||||
const deprecatedSettings = {
|
||||
'server.xsrf.token': 'server.xsrf.token is deprecated. It is no longer used when providing xsrf protection.'
|
||||
};
|
||||
|
||||
module.exports = function (path) {
|
||||
if (!path) return {};
|
||||
|
||||
|
@ -50,6 +54,10 @@ module.exports = function (path) {
|
|||
}
|
||||
}
|
||||
|
||||
_.each(deprecatedSettings, function (message, setting) {
|
||||
if (_.get(file, setting)) console.error(message);
|
||||
});
|
||||
|
||||
// transform legeacy options into new namespaced versions
|
||||
return _.transform(file, function (config, val, key) {
|
||||
if (legacySettingMap.hasOwnProperty(key)) {
|
||||
|
|
|
@ -44,6 +44,7 @@ module.exports = () => Joi.object({
|
|||
}),
|
||||
xsrf: Joi.object({
|
||||
disableProtection: Joi.boolean().default(false),
|
||||
token: Joi.string().optional().notes('Deprecated')
|
||||
}).default(),
|
||||
}).default(),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue