Улучшение поддержки reverse-proxy,

в конфиг добавлены параметры server.root и opds.root для встраивания inpx-web в уже существующий веб-сервер
This commit is contained in:
Book Pauk
2022-12-04 17:24:33 +07:00
parent 10b10f695a
commit d970863a17
3 changed files with 4 additions and 2 deletions

View File

@@ -44,12 +44,14 @@ module.exports = {
*/
server: {
root: '',
host: '0.0.0.0',
port: '22380',
},
//opds: false,
opds: {
enabled: true,
root: '',
user: '',
password: '',
},

View File

@@ -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);

View File

@@ -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`;