We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b65ece commit 35d617eCopy full SHA for 35d617e
src/registries/npm-registry.js
@@ -52,9 +52,11 @@ export default class NpmRegistry extends Registry {
52
request(pathname: string, opts?: RegistryRequestOptions = {}): Promise<*> {
53
const registry = addSuffix(this.getRegistry(pathname), '/');
54
const requestUrl = url.resolve(registry, pathname);
55
+ const alwaysAuth = this.getScopedOption(registry.replace(/^https?:/, ''), 'always-auth')
56
+ || this.getOption('always-auth');
57
58
const headers = {};
- if (this.token || (this.getOption('always-auth') && requestUrl.startsWith(registry))) {
59
+ if (this.token || (alwaysAuth && requestUrl.startsWith(registry))) {
60
headers.authorization = this.getAuth(pathname);
61
}
62
0 commit comments