Skip to content

Commit

Permalink
Send metadata header on IMDS probe request. (#15875)
Browse files Browse the repository at this point in the history
* Call imds instance endpoint instead of token endpoint to probe for imds, extend timeout

* Update msi token tests to distinguish between which imds endpoint is being called

* Fix comment and visibility in test

* Change per stpetrov

* re-trigger checks

* Add metadata header to probe request
  • Loading branch information
isaacbanner authored Dec 1, 2020
1 parent 36cfd82 commit e4cea1a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public override async Task<AppAuthenticationResult> GetAuthResultAsync(string re
{
string probeRequestUrl = $"{ImdsEndpoint}{ImdsInstanceRoute}?api-version={ImdsInstanceApiVersion}";
HttpRequestMessage imdsProbeRequest = new HttpRequestMessage(HttpMethod.Get, probeRequestUrl);
imdsProbeRequest.Headers.Add(AzureVMImdsHeader, "true");

try
{
Expand Down

0 comments on commit e4cea1a

Please sign in to comment.