Skip to content

Instantly share code, notes, and snippets.

@kerihenare
Created August 30, 2011 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kerihenare/1182189 to your computer and use it in GitHub Desktop.
Save kerihenare/1182189 to your computer and use it in GitHub Desktop.
Example proxy pac file for local development environment
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