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

16 lines (11 loc) 430 B
import url from 'url'; import { get, size } from 'lodash'; const readFile = (file) => require('fs').readFileSync(file, 'utf8'); import http from 'http'; import https from 'https'; import { parseConfig } from './parse_config'; export default function (config) { const target = url.parse(get(config, 'url')); if (!/^https/.test(target.protocol)) return new http.Agent(); return new https.Agent(parseConfig(config).ssl); }