From f830b01ac9c6ddf398e441e3e85be4508f77afd5 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Wed, 17 Apr 2024 10:54:59 -0300 Subject: [PATCH] new(core.gbapp): New API endpoint. --- src/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 008177ea..44fd2e95 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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 }