Merge pull request #7576 from ToolJet/hotfix/tjdb-default-host

Hotfix: Add default host for tjdb proxy
This commit is contained in:
Akshay 2023-10-03 13:10:01 +05:30 committed by GitHub
commit fa976d72c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ export class PostgrestProxyService {
return this.httpProxy(req, res, next);
}
private httpProxy = proxy(this.configService.get<string>('PGRST_HOST'), {
private httpProxy = proxy(this.configService.get<string>('PGRST_HOST') || 'http://localhost:3001', {
proxyReqPathResolver: function (req) {
const path = '/api/tooljet-db';
const pathRegex = new RegExp(`${maybeSetSubPath(path)}/proxy`);