diff --git a/server/index.ts b/server/index.ts index ed9333475..258672ae7 100644 --- a/server/index.ts +++ b/server/index.ts @@ -25,12 +25,12 @@ import imageproxy from '@server/routes/imageproxy'; import { appDataPermissions } from '@server/utils/appDataVolume'; import { getAppVersion } from '@server/utils/appVersion'; import createCustomProxyAgent from '@server/utils/customProxyAgent'; +import dnsCache from '@server/utils/dnsCache'; import restartFlag from '@server/utils/restartFlag'; import { getClientIp } from '@supercharge/request-ip'; import axios from 'axios'; import { TypeormStore } from 'connect-typeorm/out'; import cookieParser from 'cookie-parser'; -import { DnsCacheManager } from 'dns-caching'; import type { NextFunction, Request, Response } from 'express'; import express from 'express'; import * as OpenApiValidator from 'express-openapi-validator'; @@ -83,7 +83,6 @@ app // Add DNS caching if (settings.network.dnsCache) { - const dnsCache = new DnsCacheManager({ logger }); dnsCache.initialize(); } diff --git a/server/routes/settings/index.ts b/server/routes/settings/index.ts index 436b85e10..b2dbd1d24 100644 --- a/server/routes/settings/index.ts +++ b/server/routes/settings/index.ts @@ -28,7 +28,7 @@ import discoverSettingRoutes from '@server/routes/settings/discover'; import { ApiError } from '@server/types/error'; import { appDataPath } from '@server/utils/appDataVolume'; import { getAppVersion } from '@server/utils/appVersion'; -import { dnsCache } from '@server/utils/dnsCacheManager'; +import dnsCache from '@server/utils/dnsCache'; import { getHostname } from '@server/utils/getHostname'; import { Router } from 'express'; import rateLimit from 'express-rate-limit';