You are on page 1of 2

function FindProxyForURL(url, host)

{
if (isExternal(url, host)) return "PROXY cl8011.appl.ge.com:8080";
if (isInternal(url, host)) return "DIRECT";
return "PROXY cl8011.appl.ge.com:8080";
}
function fixhost(host)
{
return (host.toLowerCase());
}
function domainIs(str, suffix)
{
var n = str.lastIndexOf(suffix);
return (n >= 0 && n + suffix.length == str.length);
}
function wwwDomIs(host, basename)
{
return ((host == basename) || (host == "www." + basename));
}
function isInternal(url, host)
{
host = fixhost(host);
return (
shExpMatch(host,
"*.ge.com") ||
shExpMatch(host,
"3.*") ||
shExpMatch(host,
"10.*") ||
shExpMatch(host,
"*.gecdn.com") ||
shExpMatch(host,
"autodiscover.*") ||
(host
(host
(host
(host
(host
(host

==
==
==
==
==
==

"web.penske.com") ||
"spreports.accentonline.com") ||
"sl.ge") ||
"insidenbc.com") ||
"127.0.0.1") ||
"localhost") ||

isPlainHostName(host));
}
function isExternal(url, host)
{
host = fixhost(host);
return (
(host ==
"supersearch.ge.com") ||
wwwDomIs(host,
"ge.com") ||
wwwDomIs(host,
"benefits.ge.com") ||
wwwDomIs(host,
"win.ge.com") ||
domainIs(host,
"travel.ge.com") ||
domainIs(host, "partsdirect.ge.com") ||
wwwDomIs(host, "customerlink.ge.com") ||
(host ==
(host ==

"www.genstar.ge.com") ||
"gess.ge.com") ||

(host
(host
(host
(host
(host
(host
(host
(host
(host
(host

==
"pac.ge.com") ||
==
"www.sfg.ge.com") ||
== "structuredproducts.ge.com") ||
==
"commerce.supply.ge.com") ||
==
"supplynet.ge.com") ||
==
"box.ge.com") ||
==
"gesandbox.ge.com") ||
==
"payroll.ge.com") ||
== "cloudservices-stage.cloud.ge.com") ||
== "cloudservices.cloud.ge.com") ||

(host ==
shExpMatch(host,
}

"ess.ge.com") ||
"dropbox*.ge.com"));

You might also like