From 2d8ff67aceaa09b3446dedc33aa2e2e413737268 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Fri, 13 Jul 2018 20:20:41 +0300 Subject: [PATCH] [6.x] Make "legacy" Kibana server aware of connection protocol. (#20775) --- src/server/http/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server/http/index.js b/src/server/http/index.js index 60e3859830a7d..5d02b6eccb3ca 100644 --- a/src/server/http/index.js +++ b/src/server/http/index.js @@ -38,10 +38,17 @@ export default async function (kbnServer, server, config) { // Note that all connection options configured here should be exactly the same // as in `getServerOptions()` in the new platform (see `src/core/server/http/http_tools`). + // + // The only exception is `tls` property: TLS is entirely handled by the new + // platform and we don't have to duplicate all TLS related settings here, we just need + // to indicate to Hapi connection that TLS is used so that it can use correct protocol + // name in `server.info` and `request.connection.info` that are used throughout Kibana. + // // Any change SHOULD BE applied in both places. server.connection({ host: config.get('server.host'), port: config.get('server.port'), + tls: config.get('server.ssl.enabled'), listener: kbnServer.newPlatform.proxyListener, state: { strictHeader: false,