mirror of
https://github.com/actions/setup-node.git
synced 2026-01-24 07:51:45 +00:00
fix: remove hardcoded bearer
This commit is contained in:
parent
2951748f4c
commit
0e2c5c90a1
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
@ -54246,7 +54246,7 @@ class BaseDistribution {
|
||||
const dataUrl = `${initialUrl}/index.json`;
|
||||
const headers = {};
|
||||
if (this.nodeInfo.mirrorToken) {
|
||||
headers['Authorization'] = `Bearer ${this.nodeInfo.mirrorToken}`;
|
||||
headers['Authorization'] = this.nodeInfo.mirrorToken;
|
||||
}
|
||||
const response = await this.httpClient.getJson(dataUrl, headers);
|
||||
return response.result || [];
|
||||
|
||||
@ -470,7 +470,7 @@ Please refer to the [Ensuring workflow access to your package - Configuring a pa
|
||||
It is possible to use a private mirror hosting Node.js binaries. This mirror must be a full mirror of the official Node.js distribution.
|
||||
The mirror URL can be set using the `mirror` input.
|
||||
It is possible to specify a token to authenticate with the mirror using the `mirror-token` input.
|
||||
The token will be passed as a bearer token in the `Authorization` header.
|
||||
The token will be passed in the `Authorization` header.
|
||||
|
||||
```yaml
|
||||
- uses: actions/setup-node@v6
|
||||
|
||||
@ -103,7 +103,7 @@ export default abstract class BaseDistribution {
|
||||
const headers = {};
|
||||
|
||||
if (this.nodeInfo.mirrorToken) {
|
||||
headers['Authorization'] = `Bearer ${this.nodeInfo.mirrorToken}`;
|
||||
headers['Authorization'] = this.nodeInfo.mirrorToken;
|
||||
}
|
||||
|
||||
const response = await this.httpClient.getJson<INodeVersion[]>(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user