Skip to content

Instantly share code, notes, and snippets.

@yoko
Created December 17, 2009 06:34
Show Gist options
  • Save yoko/258564 to your computer and use it in GitHub Desktop.
Save yoko/258564 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host) {
var proxy = 'localhost:5432';
var domain = 'example.com';
return (dnsDomainIs(host, domain) && shExpMatch(url, '*.js')) ?
'PROXY '+proxy :
'DIRECT';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment