Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Re-add support for configuring server.host: "0" #100551

Merged
merged 1 commit into from
May 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/core/server/http/http_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,13 @@ export class HttpConfig implements IHttpConfig {
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;
const { securityResponseHeaders, disableEmbedding } = parseRawSecurityResponseHeadersConfig(
Expand Down