Skip to content

Commit

Permalink
Changes rewriteBasePath core config deprecation level to warning (#…
Browse files Browse the repository at this point in the history
…114566)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
TinaHeiligers and kibanamachine authored Oct 12, 2021
1 parent afe81bb commit bc96e40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/server/config/deprecation/core_deprecations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand All @@ -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', () => {
Expand Down
1 change: 1 addition & 0 deletions src/core/server/config/deprecation/core_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).`,
Expand Down

0 comments on commit bc96e40

Please sign in to comment.