mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
Merge branch 'master' into next55
This commit is contained in:
@@ -1 +1 @@
|
||||
module.exports = { buildDate:"2022-08-02T21:56:34+02:00", buildRevision: "12af3d05f04b9406af55ac301c0069eb385957c8" };
|
||||
module.exports = { buildDate:"2022-08-07T23:20:59+02:00", buildRevision: "3a07c5fcc059019a2330a3f6ed204eeb5df1539d" };
|
||||
|
||||
8
src/www
8
src/www
@@ -56,6 +56,14 @@ async function startTrilium() {
|
||||
app.set('port', port);
|
||||
app.set('host', host);
|
||||
|
||||
// Check from config whether to trust reverse proxies to supply user IPs, hostnames and protocols
|
||||
if (config['Network']['trustedReverseProxy']) {
|
||||
if (config['Network']['trustedReverseProxy'] === true || config['Network']['trustedReverseProxy'].trim().length) {
|
||||
app.set('trust proxy', config['Network']['trustedReverseProxy'])
|
||||
}
|
||||
}
|
||||
log.info('Trusted reverse proxy: ' + app.get('trust proxy'))
|
||||
|
||||
if (config['Network']['https']) {
|
||||
if (!config['Network']['keyPath'] || !config['Network']['keyPath'].trim().length) {
|
||||
throw new Error("keyPath in config.ini is required when https=true, but it's empty");
|
||||
|
||||
Reference in New Issue
Block a user