[6.6] Use server.basePath to create socket connection. (#29393) (#29433)

This commit is contained in:
Luke Elmers 2019-01-28 11:29:19 -07:00 committed by GitHub
parent a81ec4f9af
commit 4f652d8110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,9 @@ export default function (kibana) {
id: 'interpreter',
require: ['kibana', 'elasticsearch'],
publicDir: resolve(__dirname, 'public'),
uiExports: {
injectDefaultVars: server => ({ serverBasePath: server.config().get('server.basePath') }),
},
init,
});
}

View file

@ -23,7 +23,7 @@ import chrome from 'ui/chrome';
import { functionsRegistry } from './functions_registry';
import { typesRegistry } from './types_registry';
const basePath = chrome.getBasePath();
const basePath = chrome.getInjected('serverBasePath');
const types = {
browserFunctions: functionsRegistry,