UNPKG

kibana-riya

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

28 lines (20 loc) 692 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _boom = require('boom'); exports['default'] = function (kbnServer, server, config) { var versionHeader = 'kbn-version'; var actualVersion = config.get('pkg.version'); server.ext('onPostAuth', function (req, reply) { var versionRequested = req.headers[versionHeader]; if (versionRequested && versionRequested !== actualVersion) { return reply((0, _boom.badRequest)('Browser client is out of date, please refresh the page', { expected: actualVersion, got: versionRequested })); } return reply['continue'](); }); }; module.exports = exports['default'];