mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 12:52:38 +01:00
Display both server address and listening address in log (#300)
* Show localhost in console output instead of 0.0.0.0 * Updated message to reflect both navigation and listening address Co-authored-by: InfiniteTF <infinitekittens@protonmail.com>
This commit is contained in:
parent
9a51c586db
commit
9766071815
1 changed files with 10 additions and 2 deletions
|
|
@ -200,6 +200,12 @@ func Start() {
|
|||
}
|
||||
})
|
||||
|
||||
displayHost := config.GetHost()
|
||||
if displayHost == "0.0.0.0" {
|
||||
displayHost = "localhost"
|
||||
}
|
||||
displayAddress := displayHost + ":" + strconv.Itoa(config.GetPort())
|
||||
|
||||
address := config.GetHost() + ":" + strconv.Itoa(config.GetPort())
|
||||
if tlsConfig := makeTLSConfig(); tlsConfig != nil {
|
||||
httpsServer := &http.Server{
|
||||
|
|
@ -210,7 +216,8 @@ func Start() {
|
|||
|
||||
go func() {
|
||||
printVersion()
|
||||
logger.Infof("stash is running on HTTPS at https://" + address + "/")
|
||||
logger.Infof("stash is listening on" + address)
|
||||
logger.Infof("stash is running on HTTPS at https://" + displayAddress + "/")
|
||||
logger.Fatal(httpsServer.ListenAndServeTLS("", ""))
|
||||
}()
|
||||
} else {
|
||||
|
|
@ -221,7 +228,8 @@ func Start() {
|
|||
|
||||
go func() {
|
||||
printVersion()
|
||||
logger.Infof("stash is running on HTTP at http://" + address + "/")
|
||||
logger.Infof("stash is listening on" + address)
|
||||
logger.Infof("stash is running on HTTP at http://" + displayAddress + "/")
|
||||
logger.Fatal(server.ListenAndServe())
|
||||
}()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue