@percy/client 1.26.3-beta.0 → 1.26.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proxy.js +5 -1
- package/package.json +4 -4
package/dist/proxy.js
CHANGED
|
@@ -3,6 +3,7 @@ import tls from 'tls';
|
|
|
3
3
|
import http from 'http';
|
|
4
4
|
import https from 'https';
|
|
5
5
|
import logger from '@percy/logger';
|
|
6
|
+
import { stripQuotesAndSpaces } from '@percy/env/utils';
|
|
6
7
|
const CRLF = '\r\n';
|
|
7
8
|
const STATUS_REG = /^HTTP\/1.[01] (\d*)/;
|
|
8
9
|
|
|
@@ -62,7 +63,10 @@ export function href(options) {
|
|
|
62
63
|
// Returns the proxy URL for a set of request options
|
|
63
64
|
export function getProxy(options) {
|
|
64
65
|
let proxyUrl = options.protocol === 'https:' && (process.env.https_proxy || process.env.HTTPS_PROXY) || process.env.http_proxy || process.env.HTTP_PROXY;
|
|
65
|
-
let shouldProxy = !!proxyUrl && !hostnameMatches(process.env.no_proxy || process.env.NO_PROXY, href(options));
|
|
66
|
+
let shouldProxy = !!proxyUrl && !hostnameMatches(stripQuotesAndSpaces(process.env.no_proxy || process.env.NO_PROXY), href(options));
|
|
67
|
+
if (proxyUrl && typeof proxyUrl === 'string') {
|
|
68
|
+
proxyUrl = stripQuotesAndSpaces(proxyUrl);
|
|
69
|
+
}
|
|
66
70
|
if (shouldProxy) {
|
|
67
71
|
proxyUrl = new URL(proxyUrl);
|
|
68
72
|
let isHttps = proxyUrl.protocol === 'https:';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/client",
|
|
3
|
-
"version": "1.26.3-beta.
|
|
3
|
+
"version": "1.26.3-beta.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"test:coverage": "yarn test --coverage"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@percy/env": "1.26.3-beta.
|
|
36
|
-
"@percy/logger": "1.26.3-beta.
|
|
35
|
+
"@percy/env": "1.26.3-beta.2",
|
|
36
|
+
"@percy/logger": "1.26.3-beta.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "5e402f5ff469cc521506fef6a347e04a1a2e1434"
|
|
39
39
|
}
|