Merge branch 'main' into main
This commit is contained in:
commit
09e0e840b8
16 changed files with 492 additions and 106 deletions
|
|
@ -28,21 +28,4 @@ export const MAX_CONVERT_PROCESS =
|
|||
export const UNAUTHENTICATED_USER_SHARING =
|
||||
process.env.UNAUTHENTICATED_USER_SHARING?.toLowerCase() === "true" || false;
|
||||
|
||||
// ─────────────────────────────────────────────────────────────
|
||||
// ClamAV / Antivirus integration
|
||||
// ─────────────────────────────────────────────────────────────
|
||||
|
||||
// REST endpoint of benzino77/clamav-rest-api, e.g.
|
||||
// CLAMAV_URL=http://192.168.68.134:3000/api/v1/scan
|
||||
export const CLAMAV_URL = process.env.CLAMAV_URL ?? "";
|
||||
|
||||
// True only if CLAMAV_URL is non-empty
|
||||
export const CLAMAV_CONFIGURED = CLAMAV_URL.length > 0;
|
||||
|
||||
// Default AV toggle value:
|
||||
// - If ANTIVIRUS_ENABLED_DEFAULT=false → force disabled
|
||||
// - Otherwise: enabled only when CLAMAV is configured
|
||||
export const ANTIVIRUS_ENABLED_DEFAULT =
|
||||
process.env.ANTIVIRUS_ENABLED_DEFAULT?.toLowerCase() === "false"
|
||||
? false
|
||||
: CLAMAV_CONFIGURED;
|
||||
export const TIMEZONE = process.env.TZ || undefined;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { exec } from "node:child_process";
|
||||
import { readFile } from "node:fs";
|
||||
import { version } from "../../package.json";
|
||||
|
||||
console.log(`ConvertX v${version}`);
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
exec("cat /etc/os-release", (error, stdout) => {
|
||||
readFile("/etc/os-release", "utf8", (error, stdout) => {
|
||||
if (error) {
|
||||
console.error("Not running on docker, this is not supported.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue