Skip to content

Commit

Permalink
fix: remove authorization header from core.windows.net requests for A…
Browse files Browse the repository at this point in the history
…zure docker registries
  • Loading branch information
etiennetremel committed Jun 30, 2020
1 parent d70b8c1 commit 738f5f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/util/http/index.ts
Expand Up @@ -95,6 +95,13 @@ export class Http<GetOptions = HttpOptions, PostOptions = HttpPostOptions> {
delete opts.headers.authorization; // eslint-disable-line no-param-reassign
delete opts.auth; // eslint-disable-line no-param-reassign
}

if (opts.href?.includes('blob.core.windows.net')) {
// docker registry is hosted on Azure blob, redirect url includes authentication.
// eslint-disable-next-line no-param-reassign
delete opts.headers.authorization; // eslint-disable-line no-param-reassign
delete opts.auth; // eslint-disable-line no-param-reassign
}
},
],
};
Expand Down

0 comments on commit 738f5f6

Please sign in to comment.