Skip to content

Commit 101b366

Browse files
authored
chore(statsreporter): fix azure IMDS endpoint in statsreporter (#9243)
1 parent 1b1aa49 commit 101b366

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/version/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func detectPlatform() string {
141141
}
142142

143143
// Azure metadata
144-
if req, err := http.NewRequest(http.MethodGet, "http://169.254.169.254/metadata/instance", nil); err == nil {
144+
if req, err := http.NewRequest(http.MethodGet, "http://169.254.169.254/metadata/instance?api-version=2017-03-01", nil); err == nil {
145145
req.Header.Add("Metadata", "true")
146146
if resp, err := client.Do(req); err == nil {
147147
resp.Body.Close()

0 commit comments

Comments
 (0)