support http basic auth for registry auth
This commit is contained in:
parent
6b489a2a1f
commit
ff9c9ca98d
@ -238,7 +238,7 @@ function fetchFromRegistry(name, registry, auth) {
|
||||
name = name.replace(/\//g, "%2f");
|
||||
}
|
||||
|
||||
const opts = (auth && auth.token) ? {headers: {Authorization: `Bearer ${auth.token}`}} : undefined;
|
||||
const opts = (auth && auth.token) ? {headers: {Authorization: `${auth.type} ${auth.token}`}} : undefined;
|
||||
return fetch(`${registry}/${name}`, opts);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user