Merge eabad80c6a73dd7260f7bc96dabf7aee753491f8 into d7eb05b9361febead29a74e71ddffc2ebeff5302

This commit is contained in:
frob 2024-11-14 13:56:10 +08:00 committed by GitHub
commit c8db6d074e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1104,7 +1104,7 @@ func allowedHostsMiddleware(addr net.Addr) gin.HandlerFunc {
host, _, err := net.SplitHostPort(c.Request.Host)
if err != nil {
host = c.Request.Host
host = strings.ToLower(c.Request.Host)
}
if addr, err := netip.ParseAddr(host); err == nil {