mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 00:40:58 +01:00
chore(release): hotfix for dns-caching (#4008)
This commit is contained in:
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -33,6 +33,7 @@ body:
|
||||
options:
|
||||
# The below comment is used to insert a new version with on-release.yml
|
||||
#NEXT_VERSION#
|
||||
- 1.36.0
|
||||
- 1.35.1
|
||||
- 1.35.0
|
||||
- 1.34.0
|
||||
|
||||
@@ -24,10 +24,12 @@ export const env = createEnv({
|
||||
message: `SECRET_ENCRYPTION_KEY must only contain hex characters${errorSuffix}`,
|
||||
}),
|
||||
NO_EXTERNAL_CONNECTION: createBooleanSchema(false),
|
||||
ENABLE_DNS_CACHING: createBooleanSchema(false),
|
||||
},
|
||||
runtimeEnv: {
|
||||
SECRET_ENCRYPTION_KEY: process.env.SECRET_ENCRYPTION_KEY,
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
NO_EXTERNAL_CONNECTION: process.env.NO_EXTERNAL_CONNECTION,
|
||||
ENABLE_DNS_CACHING: process.env.ENABLE_DNS_CACHING,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import { DnsCacheManager } from "dns-caching";
|
||||
|
||||
import { logger } from "@homarr/log";
|
||||
|
||||
import { env } from "../env";
|
||||
|
||||
// Add global type augmentation for homarr
|
||||
declare global {
|
||||
var homarr: {
|
||||
@@ -19,4 +21,6 @@ global.homarr.dnsCacheManager ??= new DnsCacheManager({
|
||||
logger,
|
||||
});
|
||||
|
||||
global.homarr.dnsCacheManager.initialize();
|
||||
if (env.ENABLE_DNS_CACHING) {
|
||||
global.homarr.dnsCacheManager.initialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user