fix(core): Make DNS resolution order configurable (#7272)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-09-27 12:19:18 +02:00 committed by GitHub
parent e4c302c683
commit 5b3121c415
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -39,7 +39,10 @@ inspect.defaultOptions.customInspect = false;
require('express-async-errors');
require('source-map-support').install();
require('reflect-metadata');
require('dns').setDefaultResultOrder('ipv4first');
if (process.env.NODEJS_PREFER_IPV4 === 'true') {
require('dns').setDefaultResultOrder('ipv4first');
}
require('@oclif/command')
.run()

View file

@ -7,7 +7,6 @@
import 'source-map-support/register';
import 'reflect-metadata';
import { setDefaultResultOrder } from 'dns';
setDefaultResultOrder('ipv4first');
import { Container } from 'typedi';
import type { IProcessMessage } from 'n8n-core';
@ -59,6 +58,10 @@ import { License } from '@/License';
import { InternalHooks } from '@/InternalHooks';
import { PostHogClient } from '@/posthog';
if (process.env.NODEJS_PREFER_IPV4 === 'true') {
setDefaultResultOrder('ipv4first');
}
class WorkflowRunnerProcess {
data: IWorkflowExecutionDataProcessWithExecution | undefined;