1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

New Context.FormFiles method

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-06-07 15:33:19 +03:00
parent 32291fa59e
commit 8f9140b705
3 changed files with 70 additions and 1 deletions

View File

@@ -98,6 +98,29 @@ var IsLoopbackHost = func(requestHost string) bool {
return valid
}
/*
func isLoopbackHostGoVersion(host string) bool {
ip := net.ParseIP(host)
if ip != nil {
return ip.IsLoopback()
}
// Host is not an ip, perform lookup.
addrs, err := net.LookupHost(host)
if err != nil {
return false
}
for _, addr := range addrs {
if !net.ParseIP(addr).IsLoopback() {
return false
}
}
return true
}
*/
const (
// defaultServerHostname returns the default hostname which is "localhost"
defaultServerHostname = "localhost"