1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-26 14:27:04 +00:00

update iriscontrol - no new feature added but now listens to the parent host https://github.com/kataras/iris/issues/191

This commit is contained in:
Makis Maropoulos
2016-06-17 01:51:42 +03:00
parent 2942d384c4
commit 2f6c083232
7 changed files with 185 additions and 290 deletions

View File

@@ -9,7 +9,6 @@ Would be readily available to anyone who could intercept the HTTP request.
import (
"os"
"strconv"
"strings"
"github.com/iris-contrib/npm"
"github.com/kataras/iris"
@@ -91,17 +90,7 @@ func (e *Plugin) PreListen(s *iris.Framework) {
e.certfile = s.Config.Server.CertFile
if e.config.Host == "" {
h := s.Config.Server.ListeningAddr
if idx := strings.Index(h, ":"); idx >= 0 {
h = h[0:idx]
}
if h == "" {
h = "127.0.0.1"
}
e.config.Host = h
e.config.Host = s.HTTPServer.VirtualHostname()
}
e.start()
}