Skip to content

Commit 6a8674f

Browse files
committed
CASSJAVA-55 Remove setting "Host" header for metadata requests.
With some sysprops enabled this will actually be respected which completely borks Astra routing. patch by Bret McGuire; reviewed by Alexandre Dutra and Bret McGuire for CASSJAVA-55
1 parent 7ca013f commit 6a8674f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

core/src/main/java/com/datastax/oss/driver/internal/core/config/cloud/CloudConfigFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ protected BufferedReader fetchProxyMetadata(
229229
HttpsURLConnection connection = (HttpsURLConnection) metadataServiceUrl.openConnection();
230230
connection.setSSLSocketFactory(sslContext.getSocketFactory());
231231
connection.setRequestMethod("GET");
232-
connection.setRequestProperty("host", "localhost");
233232
return new BufferedReader(
234233
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8));
235234
} catch (ConnectException e) {

0 commit comments

Comments
 (0)