Routing xhr/fetch requests on the background via PAC file

33 Views Asked by At

Assuming I visit website https://example.com (as well as https://tets.example.com) I have a rule that will route all requests via proxy:
if (host == 'example.com' || dnsDomainIs(host, '.example.com')

But I need to route all background requests too, like to google.com or www.gstatic.com when they are originated from https://example.com website. I've looked over the documentation but dont see any obvious way. I thought I could rely on url argument but it is not the web-site origin URL but rather the request URL, so it is pontless.

0

There are 0 best solutions below