Улучшение поддержки reverse-proxy,
в конфиг добавлены параметры server.root и opds.root для встраивания inpx-web в уже существующий веб-сервер
This commit is contained in:
@@ -44,12 +44,14 @@ module.exports = {
|
||||
*/
|
||||
|
||||
server: {
|
||||
root: '',
|
||||
host: '0.0.0.0',
|
||||
port: '22380',
|
||||
},
|
||||
//opds: false,
|
||||
opds: {
|
||||
enabled: true,
|
||||
root: '',
|
||||
user: '',
|
||||
password: '',
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user