fix
This commit is contained in:
17
book/node_modules/http2-wrapper/source/proxies/get-auth-headers.js
generated
vendored
Normal file
17
book/node_modules/http2-wrapper/source/proxies/get-auth-headers.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = self => {
|
||||
const {username, password} = self.proxyOptions.url;
|
||||
|
||||
if (username || password) {
|
||||
const data = `${username}:${password}`;
|
||||
const authorization = `Basic ${Buffer.from(data).toString('base64')}`;
|
||||
|
||||
return {
|
||||
'proxy-authorization': authorization,
|
||||
authorization
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
Reference in New Issue
Block a user