mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[server/xsrf] improve user facing error message
This commit is contained in:
parent
83d1cde0ed
commit
0bd3a0f699
1 changed files with 6 additions and 1 deletions
|
@ -11,7 +11,12 @@ export default function (kbnServer, server, config) {
|
|||
|
||||
const submission = req.headers[header];
|
||||
if (!submission) return reply(badRequest(`Missing ${header} header`));
|
||||
if (submission !== version) return reply(badRequest(`Invalid ${header}, expected ${version}`, { version }));
|
||||
if (submission !== version) {
|
||||
return reply(badRequest('Browser client is out of date, please refresh the page', {
|
||||
expected: version,
|
||||
got: submission
|
||||
}));
|
||||
}
|
||||
|
||||
return reply.continue();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue