mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-02-18 16:42:57 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dbf268f37 |
@@ -2,10 +2,13 @@ import fs from "node:fs";
|
|||||||
import NodeRSA from "node-rsa";
|
import NodeRSA from "node-rsa";
|
||||||
import { global as logger } from "../logger.js";
|
import { global as logger } from "../logger.js";
|
||||||
|
|
||||||
const keysFile = '/data/keys.json';
|
const keysFile = '/data/keys.json';
|
||||||
const mysqlEngine = 'mysql2';
|
const mysqlEngine = 'mysql2';
|
||||||
const postgresEngine = 'pg';
|
const postgresEngine = 'pg';
|
||||||
const sqliteClientName = 'better-sqlite3';
|
const sqliteClientName = 'better-sqlite3';
|
||||||
|
|
||||||
|
// Not used for new setups anymore but may exist in legacy setups
|
||||||
|
const legacySqliteClientName = 'sqlite3';
|
||||||
|
|
||||||
let instance = null;
|
let instance = null;
|
||||||
|
|
||||||
@@ -184,7 +187,7 @@ const configGet = (key) => {
|
|||||||
*/
|
*/
|
||||||
const isSqlite = () => {
|
const isSqlite = () => {
|
||||||
instance === null && configure();
|
instance === null && configure();
|
||||||
return instance.database.knex && instance.database.knex.client === sqliteClientName;
|
return instance.database.knex && [sqliteClientName, legacySqliteClientName].includes(instance.database.knex.client);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user