From f52faf63f7f5f401d21f07fba9c2235f45756079 Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 21 Nov 2013 15:59:16 +0800 Subject: [PATCH] fix #304 --- context/input.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/context/input.go b/context/input.go index 50970895..5ec0abbb 100644 --- a/context/input.go +++ b/context/input.go @@ -101,14 +101,14 @@ func (input *BeegoInput) IP() string { } func (input *BeegoInput) Proxy() []string { - if ips := input.Header("HTTP_X_FORWARDED_FOR"); ips != "" { + if ips := input.Header("X-Forwarded-For"); ips != "" { return strings.Split(ips, ",") } return []string{} } func (input *BeegoInput) Refer() string { - return input.Header("HTTP_REFERER") + return input.Header("Referer") } func (input *BeegoInput) SubDomains() string { @@ -126,7 +126,7 @@ func (input *BeegoInput) Port() int { } func (input *BeegoInput) UserAgent() string { - return input.Header("HTTP_USER_AGENT") + return input.Header("User-Agent") } func (input *BeegoInput) Params(key string) string {