From db9e70984f144b6a2487926805304e73ec658433 Mon Sep 17 00:00:00 2001 From: Akshay Sasidharan Date: Tue, 3 Oct 2023 12:22:12 +0530 Subject: [PATCH] add default host for tjdb proxy --- server/src/services/postgrest_proxy.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/services/postgrest_proxy.service.ts b/server/src/services/postgrest_proxy.service.ts index 215db8df1d..4cafabeb00 100644 --- a/server/src/services/postgrest_proxy.service.ts +++ b/server/src/services/postgrest_proxy.service.ts @@ -24,7 +24,7 @@ export class PostgrestProxyService { return this.httpProxy(req, res, next); } - private httpProxy = proxy(this.configService.get('PGRST_HOST'), { + private httpProxy = proxy(this.configService.get('PGRST_HOST') || 'http://localhost:3001', { proxyReqPathResolver: function (req) { const path = '/api/tooljet-db'; const pathRegex = new RegExp(`${maybeSetSubPath(path)}/proxy`);