Skip to content

Instantly share code, notes, and snippets.

@slicksammy
Last active July 14, 2024 19:01
Show Gist options
  • Save slicksammy/f2455f77d05f13fc9651fffb966689f4 to your computer and use it in GitHub Desktop.
Save slicksammy/f2455f77d05f13fc9651fffb966689f4 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host) {
var braintreePattern = new RegExp("braintree-api.com");
var googlePattern = new RegExp("https://www.google.com");
if (braintreePattern.test(url)) {
return "PROXY 127.0.0.1:8080";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment