MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / writePacFile

Function writePacFile

javascript/selenium-webdriver/test/proxy_test.js:36–50  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

34 }
35
36 function writePacFile(res) {
37 writeResponse(
38 res,
39 [
40 'function FindProxyForURL(url, host) {',
41 ' if (shExpMatch(url, "' + goodbyeServer.url('*') + '")) {',
42 ' return "DIRECT";',
43 ' }',
44 ' return "PROXY ' + proxyServer.host() + '";',
45 '}',
46 ].join('\n'),
47 'ascii',
48 'application/x-javascript-config',
49 )
50 }
51
52 const proxyServer = new Server(function (req, res) {
53 const pathname = new URL(req.url).pathname

Callers 1

proxy_test.jsFile · 0.85

Calls 3

writeResponseFunction · 0.85
joinMethod · 0.80
urlMethod · 0.45

Tested by

no test coverage detected