Use path in PAC files

Hi Forum,
Is there any way to match the whole URL in the PAC file

I would like to bypass all connections to
Except for* (wildcard for whatever comes next)

Is there any way of doing this maybe with a variable based on regex?

You an use the shExpMatch function.

if (shExpMatch(url, “*”))
return “DIRECT”;

Hi Gordon,
Thanks for your reply. Do you know if a longer path is supported and maybe even a query string:
if (shExpMatch(url, “*”))
if (shExpMatch(url, “*”))

You can test PAC file logic here -

1 Like

By default recent browsers strip of path and stuff (for https URLs) before sending it to pac file.

If you need that also for https you would need to explicitly enable that in the browser.

As far as i know:
In Chrome, you can disable this by setting PacHttpsUrlStrippingEnabled to false
In Firefox the preference is network.proxy.autoconfig_url.include_path