(res)
| 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 |
no test coverage detected