net.SplitHostPort produces "::1", not "[::1]". Change-Id: I5270e427ab25c2fbcae3593de47d5dd48cd92479 Reviewed-on: https://go-review.googlesource.com/10743 Reviewed-by: jcd . <jcd@golang.org>
@@ -55,7 +55,7 @@ var AuthRequest = func(req *http.Request) (any, sensitive bool) {
switch {
case err != nil: // Badly formed address; fail closed.
return false, false
- case host == "localhost" || host == "127.0.0.1" || host == "[::1]":
+ case host == "localhost" || host == "127.0.0.1" || host == "::1":
return true, true
default: