Skip to content

Commit 54a8fb9

Browse files
committed
feat: Allow token to be sent on download
1 parent c9f3892 commit 54a8fb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/httpUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function fetch(input: string | URL, init?: RequestInit) {
2929
input.username = input.password = ``;
3030
}
3131

32-
if (input.origin === (process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL) && process.env.COREPACK_NPM_TOKEN) {
32+
if ((process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL).includes(input.origin) && process.env.COREPACK_NPM_TOKEN) {
3333
headers = {
3434
...headers,
3535
authorization: `Bearer ${process.env.COREPACK_NPM_TOKEN}`,

0 commit comments

Comments
 (0)