Re-add support for configuring server.host: "0" (#86806)
Support for this was lost in #85406. Fixes #86716
This commit is contained in:
parent
5e3c84ca05
commit
97858d697b
|
@ -195,7 +195,13 @@ export class HttpConfig {
|
|||
rawExternalUrlConfig: ExternalUrlConfig
|
||||
) {
|
||||
this.autoListen = rawHttpConfig.autoListen;
|
||||
this.host = rawHttpConfig.host;
|
||||
// TODO: Consider dropping support for '0' in v8.0.0. This value is passed
|
||||
// to hapi, which validates it. Prior to hapi v20, '0' was considered a
|
||||
// valid host, however the validation logic internally in hapi was
|
||||
// re-written for v20 and hapi no longer considers '0' a valid host. For
|
||||
// details, see:
|
||||
// https://github.com/elastic/kibana/issues/86716#issuecomment-749623781
|
||||
this.host = rawHttpConfig.host === '0' ? '0.0.0.0' : rawHttpConfig.host;
|
||||
this.port = rawHttpConfig.port;
|
||||
this.cors = rawHttpConfig.cors;
|
||||
this.customResponseHeaders = Object.entries(rawHttpConfig.customResponseHeaders ?? {}).reduce(
|
||||
|
|
Loading…
Reference in a new issue