new(core.gbapp): New API endpoint.
This commit is contained in:
		
							parent
							
								
									4ced6b667c
								
							
						
					
					
						commit
						f830b01ac9
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -256,8 +256,9 @@ export class GBServer {
 | 
			
		|||
            const host = req.headers.host;
 | 
			
		||||
 | 
			
		||||
            // Roteamento com base no domínio.
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            if (host === process.env.API_HOST) {
 | 
			
		||||
              GBLog.info(`Redirecting to API...`);
 | 
			
		||||
              return httpProxy.web(req, res, { target: 'http://localhost:1111' }); // Express server
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue