lib/rules/index.js
changed.
Showing 1 of 1 files from the diff.
@@ -59,10 +59,11 @@
Loading
59 | 59 | var PROXY_HOSTS_RE = /[?&]proxyHosts?(?:&|$)/i; |
|
60 | 60 | var P_HOST_RE = /[?&]host=([\w.:-]+)(?:&|$)/i; |
|
61 | 61 | ||
62 | - | function isProxyHost(req, proxy) { |
|
63 | - | var props = proxy.lineProps; |
|
64 | - | req._proxyTunnel = props.proxyTunnel || util.isEnable(req, 'proxyTunnel'); |
|
65 | - | return props.proxyHost; |
|
62 | + | function isProxyHost(req, proxy, host) { |
|
63 | + | if (proxy) { |
|
64 | + | req._proxyTunnel = proxy.lineProps.proxyTunnel || util.isEnable(req, 'proxyTunnel'); |
|
65 | + | } |
|
66 | + | return host && host.lineProps.proxyHost; |
|
66 | 67 | } |
|
67 | 68 | ||
68 | 69 | function getProxy(url, req, callback, isHttpProxy) { |
@@ -92,7 +93,6 @@
Loading
92 | 93 | (fRules && fRules.resolveProxy(req, isHttpProxy)) || (hRules && hRules.resolveProxy(req, isHttpProxy)); |
|
93 | 94 | var proxyHost = util.isEnable(req, 'proxyHost'); |
|
94 | 95 | if (proxy) { |
|
95 | - | proxyHost = isProxyHost(req, proxy) || proxyHost; // 不能调换顺序 |
|
96 | 96 | var protocol = proxy.matcher.substring(0, proxy.matcher.indexOf(':')); |
|
97 | 97 | ignoreProxy = !filter['ignore:' + protocol] && (util.isIgnored(filter, 'proxy') || util.isIgnored(filter, protocol)); |
|
98 | 98 | if (ignoreProxy) { |
@@ -102,6 +102,7 @@
Loading
102 | 102 | } |
|
103 | 103 | } |
|
104 | 104 | var host = rules.getHost(req, pRules, fRules, hRules); |
|
105 | + | proxyHost = isProxyHost(req, proxy, host) || proxyHost; // 不能调换顺序 |
|
105 | 106 | var setHost = function() { |
|
106 | 107 | if (!host) { |
|
107 | 108 | return false; |
1822.4
1822.1
1822.2
1822.3
1822.6
1822.5
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.