mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: pass on the auth from the download URL (#10271)
This commit is contained in:
parent
50e72a4d11
commit
3a1f4f0f8f
13
package-lock.json
generated
13
package-lock.json
generated
@ -25,7 +25,7 @@
|
|||||||
"@types/diff": "5.0.2",
|
"@types/diff": "5.0.2",
|
||||||
"@types/mime": "3.0.1",
|
"@types/mime": "3.0.1",
|
||||||
"@types/mocha": "10.0.1",
|
"@types/mocha": "10.0.1",
|
||||||
"@types/node": "18.14.6",
|
"@types/node": "20.2.5",
|
||||||
"@types/pixelmatch": "5.2.4",
|
"@types/pixelmatch": "5.2.4",
|
||||||
"@types/pngjs": "6.0.1",
|
"@types/pngjs": "6.0.1",
|
||||||
"@types/progress": "2.0.5",
|
"@types/progress": "2.0.5",
|
||||||
@ -1815,9 +1815,10 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.14.6",
|
"version": "20.2.5",
|
||||||
"devOptional": true,
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
|
||||||
"license": "MIT"
|
"integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
|
||||||
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/normalize-package-data": {
|
"node_modules/@types/normalize-package-data": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
@ -11256,7 +11257,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "18.14.6",
|
"version": "20.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
|
||||||
|
"integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"@types/normalize-package-data": {
|
"@types/normalize-package-data": {
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
"@types/diff": "5.0.2",
|
"@types/diff": "5.0.2",
|
||||||
"@types/mime": "3.0.1",
|
"@types/mime": "3.0.1",
|
||||||
"@types/mocha": "10.0.1",
|
"@types/mocha": "10.0.1",
|
||||||
"@types/node": "18.14.6",
|
"@types/node": "20.2.5",
|
||||||
"@types/pixelmatch": "5.2.4",
|
"@types/pixelmatch": "5.2.4",
|
||||||
"@types/pngjs": "6.0.1",
|
"@types/pngjs": "6.0.1",
|
||||||
"@types/progress": "2.0.5",
|
"@types/progress": "2.0.5",
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import {createWriteStream} from 'fs';
|
import {createWriteStream} from 'fs';
|
||||||
import * as http from 'http';
|
import * as http from 'http';
|
||||||
import * as https from 'https';
|
import * as https from 'https';
|
||||||
import {URL} from 'url';
|
import {URL, urlToHttpOptions} from 'url';
|
||||||
|
|
||||||
import {ProxyAgent} from 'proxy-agent';
|
import {ProxyAgent} from 'proxy-agent';
|
||||||
|
|
||||||
@ -50,6 +50,7 @@ export function httpRequest(
|
|||||||
path: url.pathname + url.search,
|
path: url.pathname + url.search,
|
||||||
method,
|
method,
|
||||||
headers: keepAlive ? {Connection: 'keep-alive'} : undefined,
|
headers: keepAlive ? {Connection: 'keep-alive'} : undefined,
|
||||||
|
auth: urlToHttpOptions(url).auth,
|
||||||
agent: new ProxyAgent(),
|
agent: new ProxyAgent(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user