fix: correct dns-caching module configuration

This commit is contained in:
Gauthier
2025-06-19 12:11:12 +02:00
committed by gauthier-th
parent 1eec1823d5
commit ec4ed21a49
2 changed files with 2 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -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';