Улучшение поддержки reverse-proxy,
в конфиг добавлены параметры server.root и opds.root для встраивания inpx-web в уже существующий веб-сервер
This commit is contained in:
@@ -44,12 +44,14 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
server: {
|
server: {
|
||||||
|
root: '',
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: '22380',
|
port: '22380',
|
||||||
},
|
},
|
||||||
//opds: false,
|
//opds: false,
|
||||||
opds: {
|
opds: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
root: '',
|
||||||
user: '',
|
user: '',
|
||||||
password: '',
|
password: '',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ module.exports = function(app, config) {
|
|||||||
if (!config.opds || !config.opds.enabled)
|
if (!config.opds || !config.opds.enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const opdsRoot = '/opds';
|
const opdsRoot = config.opds.root || '/opds';
|
||||||
config.opdsRoot = opdsRoot;
|
config.opdsRoot = opdsRoot;
|
||||||
|
|
||||||
const root = new RootPage(config);
|
const root = new RootPage(config);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ async function init() {
|
|||||||
config.logDir = `${config.dataDir}/log`;
|
config.logDir = `${config.dataDir}/log`;
|
||||||
config.publicDir = `${config.dataDir}/public`;
|
config.publicDir = `${config.dataDir}/public`;
|
||||||
config.publicFilesDir = `${config.dataDir}/public-files`;
|
config.publicFilesDir = `${config.dataDir}/public-files`;
|
||||||
config.rootPathStatic = `/root`;
|
config.rootPathStatic = config.server.root || '';
|
||||||
config.bookPathStatic = `${config.rootPathStatic}/book`;
|
config.bookPathStatic = `${config.rootPathStatic}/book`;
|
||||||
config.bookDir = `${config.publicFilesDir}/book`;
|
config.bookDir = `${config.publicFilesDir}/book`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user