mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
Fix: missing custom port on re-written links
When a link was rewritten and the site is running in a custom (ie, not protocol standard - http/80, https/443) port, the links became invalid. We now include them only when necessary.
This commit is contained in:
@@ -48,8 +48,10 @@ if(config.https_enabled) {
|
||||
}
|
||||
https = require('https').Server(credentials, app)
|
||||
global.protocol = 'https://'
|
||||
global.custom_port = config.ssl_port === '443' ? '' : `:${config.ssl_port}`
|
||||
} else {
|
||||
global.protocol = 'http://'
|
||||
global.custom_port = config.nonssl_port === '80' ? '' : `:${config.nonssl_port}`
|
||||
}
|
||||
|
||||
const http = require('http').Server(app)
|
||||
|
||||
Reference in New Issue
Block a user