f52faf63 by astaxie

fix #304

1 parent b9fb88f5
...@@ -101,14 +101,14 @@ func (input *BeegoInput) IP() string { ...@@ -101,14 +101,14 @@ func (input *BeegoInput) IP() string {
101 } 101 }
102 102
103 func (input *BeegoInput) Proxy() []string { 103 func (input *BeegoInput) Proxy() []string {
104 if ips := input.Header("HTTP_X_FORWARDED_FOR"); ips != "" { 104 if ips := input.Header("X-Forwarded-For"); ips != "" {
105 return strings.Split(ips, ",") 105 return strings.Split(ips, ",")
106 } 106 }
107 return []string{} 107 return []string{}
108 } 108 }
109 109
110 func (input *BeegoInput) Refer() string { 110 func (input *BeegoInput) Refer() string {
111 return input.Header("HTTP_REFERER") 111 return input.Header("Referer")
112 } 112 }
113 113
114 func (input *BeegoInput) SubDomains() string { 114 func (input *BeegoInput) SubDomains() string {
...@@ -126,7 +126,7 @@ func (input *BeegoInput) Port() int { ...@@ -126,7 +126,7 @@ func (input *BeegoInput) Port() int {
126 } 126 }
127 127
128 func (input *BeegoInput) UserAgent() string { 128 func (input *BeegoInput) UserAgent() string {
129 return input.Header("HTTP_USER_AGENT") 129 return input.Header("User-Agent")
130 } 130 }
131 131
132 func (input *BeegoInput) Params(key string) string { 132 func (input *BeegoInput) Params(key string) string {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!