Skip to content

Commit

Permalink
Merge branch 'master' into data-streams/delete-action
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jun 24, 2020
2 parents 4670f98 + fc9df72 commit 729228e
Show file tree
Hide file tree
Showing 81 changed files with 1,710 additions and 1,423 deletions.
2 changes: 2 additions & 0 deletions src/core/server/http/__snapshots__/http_config.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/core/server/http/http_config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ test('throws if basepath appends a slash', () => {
expect(() => httpSchema.validate(obj)).toThrowErrorMatchingSnapshot();
});

test('throws if basepath is an empty string', () => {
const httpSchema = config.schema;
const obj = {
basePath: '',
};
expect(() => httpSchema.validate(obj)).toThrowErrorMatchingSnapshot();
});

test('throws if basepath is not specified, but rewriteBasePath is set', () => {
const httpSchema = config.schema;
const obj = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/http_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { hostname } from 'os';
import { CspConfigType, CspConfig, ICspConfig } from '../csp';
import { SslConfig, sslSchema } from './ssl_config';

const validBasePathRegex = /(^$|^\/.*[^\/]$)/;
const validBasePathRegex = /^\/.*[^\/]$/;
const uuidRegexp = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i;

const match = (regex: RegExp, errorMsg: string) => (str: string) =>
Expand Down
5 changes: 0 additions & 5 deletions src/legacy/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import Fs from 'fs';
import { resolve } from 'path';
import { promisify } from 'util';

import { importApi } from './server/routes/api/import';
import { exportApi } from './server/routes/api/export';
import { getUiSettingDefaults } from './server/ui_setting_defaults';
import { registerCspCollector } from './server/lib/csp_usage_collector';
import { injectVars } from './inject_vars';
Expand Down Expand Up @@ -91,9 +89,6 @@ export default function (kibana) {

init: async function (server) {
const { usageCollection } = server.newPlatform.setup.plugins;
// routes
importApi(server);
exportApi(server);
registerCspCollector(usageCollection, server);
server.injectUiAppVars('kibana', () => injectVars(server));
},
Expand Down
Loading

0 comments on commit 729228e

Please sign in to comment.