fix: pathname 有search的时候有问题
This commit is contained in:
		@@ -112,8 +112,10 @@ export const handleRequest = async (req: http.IncomingMessage, res: http.ServerR
 | 
			
		||||
      app = data.app;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  const url = req.url;
 | 
			
		||||
  if (!domainApp && noProxyUrl.includes(req.url)) {
 | 
			
		||||
  // const url = req.url;
 | 
			
		||||
  const pathname = new URL(req.url, `http://${dns.hostName}`).pathname;
 | 
			
		||||
  const url = pathname;
 | 
			
		||||
  if (!domainApp && noProxyUrl.includes(url)) {
 | 
			
		||||
    res.write('No proxy for this URL\n');
 | 
			
		||||
    return res.end();
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user