mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
rewrite middleware: add PrimarySubdomain and simplify its usage example
This commit is contained in:
@@ -889,7 +889,8 @@ func GetDomain(hostport string) string {
|
||||
}
|
||||
|
||||
switch host {
|
||||
case "127.0.0.1", "0.0.0.0", "::1", "[::1]", "0:0:0:0:0:0:0:0", "0:0:0:0:0:0:0:1":
|
||||
// We could use the netutil.LoopbackRegex but leave it as it's for now, it's faster.
|
||||
case "localhost", "127.0.0.1", "0.0.0.0", "::1", "[::1]", "0:0:0:0:0:0:0:0", "0:0:0:0:0:0:0:1":
|
||||
// loopback.
|
||||
return "localhost"
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user