We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b661c62 commit 744ca64Copy full SHA for 744ca64
1 file changed
google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java
@@ -408,7 +408,7 @@ protected static String googleCloudProjectId() {
408
try {
409
URL url = new URL("http://metadata/computeMetadata/v1/project/project-id");
410
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
411
- connection.setRequestProperty("X-Google-Metadata-Request", "True");
+ connection.setRequestProperty("Metadata-Flavor", "Google");
412
InputStream input = connection.getInputStream();
413
if (connection.getResponseCode() == 200) {
414
try (BufferedReader reader = new BufferedReader(new InputStreamReader(input, UTF_8))) {
0 commit comments