Created
August 30, 2011 21:55
-
-
Save kerihenare/1182189 to your computer and use it in GitHub Desktop.
Example proxy pac file for local development environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tests = [ | |
'*.local', | |
'*.local.nz', | |
'*.local.au', | |
'*.fws' | |
], | |
direct = 'DIRECT', | |
proxy = 'PROXY webserver:80'; | |
var FindProxyForURL = function (url, host) { | |
var i = 0; | |
for (i = 0; i < tests.length; i = i + 1) { | |
if (shExpMatch(host, tests[i])) { | |
return proxy; | |
} | |
} | |
return direct; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment