mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-29 22:29:31 +02:00
Fix listening url log with ipv6 host
This commit is contained in:
parent
fd4932cdbb
commit
553ffd1934
1 changed files with 8 additions and 2 deletions
|
@ -11,6 +11,7 @@ const axios = require('axios')
|
||||||
const { version } = require('../package.json')
|
const { version } = require('../package.json')
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
|
const is = require('./libs/requestIp/isJs')
|
||||||
const fileUtils = require('./utils/fileUtils')
|
const fileUtils = require('./utils/fileUtils')
|
||||||
const { toNumber } = require('./utils/index')
|
const { toNumber } = require('./utils/index')
|
||||||
const Logger = require('./Logger')
|
const Logger = require('./Logger')
|
||||||
|
@ -419,8 +420,13 @@ class Server {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.server.listen(this.Port, this.Host, () => {
|
this.server.listen(this.Port, this.Host, () => {
|
||||||
if (this.Host) Logger.info(`Listening on http://${this.Host}:${this.Port}`)
|
if (this.Host) {
|
||||||
else Logger.info(`Listening on port :${this.Port}`)
|
let host = this.Host
|
||||||
|
if (is.ipv6(host)) {
|
||||||
|
host = '[' + host + ']'
|
||||||
|
}
|
||||||
|
Logger.info(`Listening on http://${host}:${this.Port}`)
|
||||||
|
} else Logger.info(`Listening on port :${this.Port}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue