From d970863a17b0bf6c96ae74b381e0bcaf05cbe54f Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 4 Dec 2022 17:24:33 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B8=20reverse-proxy,=20=D0=B2=20=D0=BA=D0=BE=D0=BD=D1=84?= =?UTF-8?q?=D0=B8=D0=B3=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D1=8B?= =?UTF-8?q?=20server.root=20=D0=B8=20opds.root=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B2=D1=81=D1=82=D1=80=D0=B0=D0=B8=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20inpx-web=20=D0=B2=20=D1=83=D0=B6=D0=B5=20=D1=81=D1=83?= =?UTF-8?q?=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B2=D0=B5=D0=B1-=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/config/base.js | 2 ++ server/core/opds/index.js | 2 +- server/index.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/config/base.js b/server/config/base.js index efb92e0..0697375 100644 --- a/server/config/base.js +++ b/server/config/base.js @@ -44,12 +44,14 @@ module.exports = { */ server: { + root: '', host: '0.0.0.0', port: '22380', }, //opds: false, opds: { enabled: true, + root: '', user: '', password: '', }, diff --git a/server/core/opds/index.js b/server/core/opds/index.js index 29aaab7..b2cc556 100644 --- a/server/core/opds/index.js +++ b/server/core/opds/index.js @@ -14,7 +14,7 @@ module.exports = function(app, config) { if (!config.opds || !config.opds.enabled) return; - const opdsRoot = '/opds'; + const opdsRoot = config.opds.root || '/opds'; config.opdsRoot = opdsRoot; const root = new RootPage(config); diff --git a/server/index.js b/server/index.js index 3d9aa66..c5bc31a 100644 --- a/server/index.js +++ b/server/index.js @@ -50,7 +50,7 @@ async function init() { config.logDir = `${config.dataDir}/log`; config.publicDir = `${config.dataDir}/public`; config.publicFilesDir = `${config.dataDir}/public-files`; - config.rootPathStatic = `/root`; + config.rootPathStatic = config.server.root || ''; config.bookPathStatic = `${config.rootPathStatic}/book`; config.bookDir = `${config.publicFilesDir}/book`;