From a900e7888c50e65e5a830794c2cff536944cd51c Mon Sep 17 00:00:00 2001 From: techjanitor Date: Sat, 7 Feb 2015 22:44:53 -0600 Subject: [PATCH] Update context.go Add localhost to proxies --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index 2f0e2d8..c39d5e2 100644 --- a/context.go +++ b/context.go @@ -230,7 +230,7 @@ func ipInMasks(ip net.IP, masks []interface{}) bool { func ForwardedFor(proxies ...interface{}) HandlerFunc { if len(proxies) == 0 { // default to local ips - var reservedLocalIps = []string{"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"} + var reservedLocalIps = []string{"10.0.0.0/8", "127.0.0.1/32", "172.16.0.0/12", "192.168.0.0/16"} proxies = make([]interface{}, len(reservedLocalIps))