From 87cedef3cfca9b8a03100f7de4a3c1d40ac260d9 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 18 Sep 2018 10:29:02 +0200 Subject: [PATCH] NETWORKING:Def CName in Http Publish Addr to True (#33631) * Follow up to #32806 setting the setting to true for 7.x --- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 3 --- docs/build.gradle | 2 -- modules/lang-painless/build.gradle | 1 - server/src/main/java/org/elasticsearch/http/HttpInfo.java | 2 +- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 06c0827f1ff27..0553f9395958d 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -828,9 +828,6 @@ class BuildPlugin implements Plugin { // TODO: remove this once ctx isn't added to update script params in 7.0 systemProperty 'es.scripting.update.ctx_in_params', 'false' - //TODO: remove this once the cname is prepended to the address by default in 7.0 - systemProperty 'es.http.cname_in_publish_address', 'true' - // Set the system keystore/truststore password if we're running tests in a FIPS-140 JVM if (project.inFipsJvm) { systemProperty 'javax.net.ssl.trustStorePassword', 'password' diff --git a/docs/build.gradle b/docs/build.gradle index aa075d05cd5dd..864567ba8358a 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -56,8 +56,6 @@ integTestCluster { // TODO: remove this for 7.0, this exists to allow the doc examples in 6.x to continue using the defaults systemProperty 'es.scripting.update.ctx_in_params', 'false' - //TODO: remove this once the cname is prepended to the address by default in 7.0 - systemProperty 'es.http.cname_in_publish_address', 'true' } // remove when https://github.com/elastic/elasticsearch/issues/31305 is fixed diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 6f68c667fe63d..b3cab595201a5 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -25,7 +25,6 @@ esplugin { integTestCluster { module project.project(':modules:mapper-extras') systemProperty 'es.scripting.update.ctx_in_params', 'false' - systemProperty 'es.http.cname_in_publish_address', 'true' } dependencies { diff --git a/server/src/main/java/org/elasticsearch/http/HttpInfo.java b/server/src/main/java/org/elasticsearch/http/HttpInfo.java index aece813199479..22bcd31850d29 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpInfo.java +++ b/server/src/main/java/org/elasticsearch/http/HttpInfo.java @@ -41,7 +41,7 @@ public class HttpInfo implements Writeable, ToXContentFragment { /** Whether to add hostname to publish host field when serializing. */ private static final boolean CNAME_IN_PUBLISH_HOST = - parseBoolean(System.getProperty("es.http.cname_in_publish_address"), false); + parseBoolean(System.getProperty("es.http.cname_in_publish_address"), true); private final BoundTransportAddress address; private final long maxContentLength;