1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 21:07:03 +00:00
Former-commit-id: f0a26383ace695525d5aec52ec2181d781d26a83
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-07-19 12:27:35 +03:00
parent 4c4b2f5d00
commit 452b7d2df0
13 changed files with 37 additions and 38 deletions

17
iris.go
View File

@@ -859,8 +859,6 @@ func (app *Application) tryStartTunneling() {
return
}
hostIndex := 0
app.ConfigureHost(func(su *host.Supervisor) {
su.RegisterOnServe(func(h host.TaskHost) {
tc := app.config.Tunneling
@@ -868,10 +866,9 @@ func (app *Application) tryStartTunneling() {
tc.WebInterface = "http://127.0.0.1:4040"
}
if len(tc.Tunnels) > hostIndex {
t := tc.Tunnels[hostIndex]
for tunnIdx, t := range tc.Tunnels {
if t.Name == "" {
t.Name = fmt.Sprintf("iris-app-%d-%s", hostIndex+1, time.Now().Format(app.config.TimeFormat))
t.Name = fmt.Sprintf("iris-app-%d-%s", tunnIdx+1, time.Now().Format(app.config.TimeFormat))
}
if t.Addr == "" {
@@ -888,19 +885,9 @@ func (app *Application) tryStartTunneling() {
// to make subdomains resolution still based on this new remote, public addresses.
app.config.vhost = publicAddr[strings.Index(publicAddr, "://")+3:]
// app.logger.Debugf("Host: new virtual host is %s", app.config.vhost)
// app.Logger().Printer.Output.Write([]byte("))
// directLog := []byte(fmt.Sprintf("| Public Address: %s |\n", publicAddr))
// box := bytes.Repeat([]byte("="), len(directLog))
// directLog = append(append(box, []byte("\n")...), append(directLog, append(box, []byte("\n")...)...)...)
directLog := []byte(fmt.Sprintf("⬝ Public Address: %s\n", publicAddr))
app.Logger().Printer.Output.Write(directLog)
}
hostIndex++
})
})
}