diff --git a/packages/nocodb/src/run/docker.ts b/packages/nocodb/src/run/docker.ts index a1b2634d57..130fcfa7e9 100644 --- a/packages/nocodb/src/run/docker.ts +++ b/packages/nocodb/src/run/docker.ts @@ -1,7 +1,11 @@ +import dns from 'node:dns'; import cors from 'cors'; import express from 'express'; import Noco from '../Noco'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.disable('etag'); diff --git a/packages/nocodb/src/run/dockerEntry.ts b/packages/nocodb/src/run/dockerEntry.ts index b78b783a57..ea4337b7a5 100644 --- a/packages/nocodb/src/run/dockerEntry.ts +++ b/packages/nocodb/src/run/dockerEntry.ts @@ -1,7 +1,11 @@ +import dns from 'node:dns'; import express from 'express'; import cors from 'cors'; import Noco from '../Noco'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.use(cors()); diff --git a/packages/nocodb/src/run/dockerRunMysql.ts b/packages/nocodb/src/run/dockerRunMysql.ts index a3c2f7cef2..81b1f891eb 100644 --- a/packages/nocodb/src/run/dockerRunMysql.ts +++ b/packages/nocodb/src/run/dockerRunMysql.ts @@ -1,7 +1,11 @@ +import dns from 'node:dns'; import cors from 'cors'; import express from 'express'; import Noco from '../Noco'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.disable('etag'); diff --git a/packages/nocodb/src/run/dockerRunPG.ts b/packages/nocodb/src/run/dockerRunPG.ts index d3444846bf..63c07adb4c 100644 --- a/packages/nocodb/src/run/dockerRunPG.ts +++ b/packages/nocodb/src/run/dockerRunPG.ts @@ -1,7 +1,11 @@ +import dns from 'node:dns'; import cors from 'cors'; import express from 'express'; import Noco from '../Noco'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.disable('etag'); diff --git a/packages/nocodb/src/run/dockerRunPG_CyQuick.ts b/packages/nocodb/src/run/dockerRunPG_CyQuick.ts index c8a8131280..db5a5bc313 100644 --- a/packages/nocodb/src/run/dockerRunPG_CyQuick.ts +++ b/packages/nocodb/src/run/dockerRunPG_CyQuick.ts @@ -1,7 +1,11 @@ +import dns from 'node:dns'; import cors from 'cors'; import express from 'express'; import Noco from '../Noco'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.disable('etag'); diff --git a/packages/nocodb/src/run/local.ts b/packages/nocodb/src/run/local.ts index df29c1092a..66d2c0f606 100644 --- a/packages/nocodb/src/run/local.ts +++ b/packages/nocodb/src/run/local.ts @@ -1,9 +1,12 @@ +import dns from 'node:dns'; import path from 'path'; import cors from 'cors'; import express from 'express'; - import Noco from '../Noco'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.use(cors()); diff --git a/packages/nocodb/src/run/testDocker.ts b/packages/nocodb/src/run/testDocker.ts index 5e972cdaf2..68b9760763 100644 --- a/packages/nocodb/src/run/testDocker.ts +++ b/packages/nocodb/src/run/testDocker.ts @@ -1,3 +1,4 @@ +import dns from 'node:dns'; import axios from 'axios'; import cors from 'cors'; import express from 'express'; @@ -6,6 +7,9 @@ import Noco from '../Noco'; process.env.NC_VERSION = '0009044'; +// ref: https://github.com/nodejs/node/issues/40702#issuecomment-1103623246 +dns.setDefaultResultOrder('ipv4first'); + const server = express(); server.enable('trust proxy'); server.disable('etag');