fix: unable to change certificate path for running from source (#3582)
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
@@ -12,6 +12,10 @@ AUTH_SECRET="supersecret"
|
|||||||
# or starting the project without any (which will show a randomly generated one).
|
# or starting the project without any (which will show a randomly generated one).
|
||||||
SECRET_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
SECRET_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
|
||||||
|
# Cron job API key is generated every time the container starts as it is required for communication between nextjs-api and tasks-api
|
||||||
|
# export CRON_JOB_API_KEY=$(openssl rand -base64 32)
|
||||||
|
# CRON_JOB_API_KEY="your-generated-api-key"
|
||||||
|
|
||||||
LOG_LEVEL='info'
|
LOG_LEVEL='info'
|
||||||
|
|
||||||
# This is how you can use the sqlite driver:
|
# This is how you can use the sqlite driver:
|
||||||
@@ -30,7 +34,8 @@ DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
|
|||||||
# DB_PASSWORD='password'
|
# DB_PASSWORD='password'
|
||||||
# DB_NAME='name-of-database'
|
# DB_NAME='name-of-database'
|
||||||
|
|
||||||
# The below path can be used to store trusted certificates during development, it is not required and can be left empty.
|
# The below path can be used to store trusted certificates, it is not required and can be left empty.
|
||||||
|
# If it is empty, it will default to `/appdata/trusted-certificates` in production.
|
||||||
# If it is used, please use the full path to the directory where the certificates are stored.
|
# If it is used, please use the full path to the directory where the certificates are stored.
|
||||||
# LOCAL_CERTIFICATE_PATH='FULL_PATH_TO_CERTIFICATES'
|
# LOCAL_CERTIFICATE_PATH='FULL_PATH_TO_CERTIFICATES'
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,8 @@ import { db } from "@homarr/db";
|
|||||||
import type { trustedCertificateHostnames } from "@homarr/db/schema";
|
import type { trustedCertificateHostnames } from "@homarr/db/schema";
|
||||||
|
|
||||||
const getCertificateFolder = () => {
|
const getCertificateFolder = () => {
|
||||||
return env.NODE_ENV === "production"
|
if (env.NODE_ENV !== "production") return process.env.LOCAL_CERTIFICATE_PATH;
|
||||||
? path.join("/appdata", "trusted-certificates")
|
return process.env.LOCAL_CERTIFICATE_PATH ?? path.join("/appdata", "trusted-certificates");
|
||||||
: process.env.LOCAL_CERTIFICATE_PATH;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const loadCustomRootCertificatesAsync = async () => {
|
export const loadCustomRootCertificatesAsync = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user