Changes rewriteBasePath core config deprecation level to warning (#114566)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Christiane (Tina) Heiligers 2021-10-12 07:02:03 -07:00 committed by GitHub
parent afe81bb1a2
commit bc96e408c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -54,7 +54,7 @@ describe('core deprecations', () => {
describe('rewriteBasePath', () => {
it('logs a warning is server.basePath is set and server.rewriteBasePath is not', () => {
const { messages } = applyCoreDeprecations({
const { messages, levels } = applyCoreDeprecations({
server: {
basePath: 'foo',
},
@ -64,6 +64,11 @@ describe('core deprecations', () => {
"You should set server.basePath along with server.rewriteBasePath. Starting in 7.0, Kibana will expect that all requests start with server.basePath rather than expecting you to rewrite the requests in your reverse proxy. Set server.rewriteBasePath to false to preserve the current behavior and silence this warning.",
]
`);
expect(levels).toMatchInlineSnapshot(`
Array [
"warning",
]
`);
});
it('does not log a warning if both server.basePath and server.rewriteBasePath are unset', () => {

View file

@ -16,6 +16,7 @@ const rewriteBasePathDeprecation: ConfigDeprecation = (settings, fromPath, addDe
'will expect that all requests start with server.basePath rather than expecting you to rewrite ' +
'the requests in your reverse proxy. Set server.rewriteBasePath to false to preserve the ' +
'current behavior and silence this warning.',
level: 'warning',
correctiveActions: {
manualSteps: [
`Set 'server.rewriteBasePath' in the config file, CLI flag, or environment variable (in Docker only).`,