Merge pull request #6 from caddyserver/pac-direct-localhost

PAC file: configure to access localhost directly
This commit is contained in:
sergeyfrolov 2017-10-31 16:13:31 -06:00 committed by GitHub
commit 55b7450e88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,6 +208,8 @@ func (fp *ForwardProxy) shouldServePacFile(r *http.Request) bool {
const pacFile = `
function FindProxyForURL(url, host) {
if (host === "127.0.0.1" || host === "::1" || host === "localhost")
return "DIRECT";
return "HTTPS %s:%s";
}
`