More verbose unfurler logs
This commit is contained in:
		
							parent
							
								
									df8b6cd53c
								
							
						
					
					
						commit
						3bda5537d7
					
				@ -258,12 +258,14 @@ class Server {
 | 
				
			|||||||
        res.status(404).send();
 | 
					        res.status(404).send();
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
 | 
					        logger.info('proxying resource "' + req.url + '"');
 | 
				
			||||||
        if (this.secureHost) {
 | 
					        if (this.secureHost) {
 | 
				
			||||||
          https.get(config.SERVER.HOST + ':4200' + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => {
 | 
					          https.get(config.SERVER.HOST + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => {
 | 
				
			||||||
            res.writeHead(got.statusCode, got.headers);
 | 
					            res.writeHead(got.statusCode, got.headers);
 | 
				
			||||||
            return got.pipe(res);
 | 
					            return got.pipe(res);
 | 
				
			||||||
          });        } else {
 | 
					          });
 | 
				
			||||||
          http.get(config.SERVER.HOST + ':4200' + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => {
 | 
					        } else {
 | 
				
			||||||
 | 
					          http.get(config.SERVER.HOST + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => {
 | 
				
			||||||
            res.writeHead(got.statusCode, got.headers);
 | 
					            res.writeHead(got.statusCode, got.headers);
 | 
				
			||||||
            return got.pipe(res);
 | 
					            return got.pipe(res);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
@ -272,6 +274,8 @@ class Server {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    logger.info((unfurl ? 'unfurling ' : 'slurping  "') + req.url + '"');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let result = '';
 | 
					    let result = '';
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      if (unfurl) {
 | 
					      if (unfurl) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user