8000 Merge pull request #271 from tucksaun/feat/proxy-override-host · symfony-cli/symfony-cli@050e804 · GitHub
[go: up one dir, main page]

Skip to content

Commit 050e804

Browse files
authored
Merge pull request #271 from tucksaun/feat/proxy-override-host
Proxy: allow to by-pass some domains with the local TLD
2 parents 155c3aa + 7c2f9a7 commit 050e804

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

local/proxy/proxy.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,13 @@ func (p *Proxy) servePacFile(w http.ResponseWriter, r *http.Request) {
324324
// Configuration file in ~/.symfony5/proxy.json
325325
function FindProxyForURL (url, host) {
326326
if (dnsDomainIs(host, '.%s')) {
327+
if (isResolvable(host)) {
328+
return 'DIRECT';
329+
}
330+
327331
return 'PROXY %s';
328332
}
333+
329334
return 'DIRECT';
330335
}
331336
`, p.TLD, p.TLD, r.Host)))

0 commit comments

Comments
 (0)
0