UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

20 lines (15 loc) 564 B
import { badRequest } from 'boom'; export default function (kbnServer, server, config) { const versionHeader = 'kbn-version'; const actualVersion = config.get('pkg.version'); server.ext('onPostAuth', function (req, reply) { const versionRequested = req.headers[versionHeader]; if (versionRequested && versionRequested !== actualVersion) { return reply(badRequest('Browser client is out of date, please refresh the page', { expected: actualVersion, got: versionRequested })); } return reply.continue(); }); }