Commit f52faf63 authored by astaxie's avatar astaxie

fix #304

parent b9fb88f5
...@@ -101,14 +101,14 @@ func (input *BeegoInput) IP() string { ...@@ -101,14 +101,14 @@ func (input *BeegoInput) IP() string {
} }
func (input *BeegoInput) Proxy() []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 strings.Split(ips, ",")
} }
return []string{} return []string{}
} }
func (input *BeegoInput) Refer() string { func (input *BeegoInput) Refer() string {
return input.Header("HTTP_REFERER") return input.Header("Referer")
} }
func (input *BeegoInput) SubDomains() string { func (input *BeegoInput) SubDomains() string {
...@@ -126,7 +126,7 @@ func (input *BeegoInput) Port() int { ...@@ -126,7 +126,7 @@ func (input *BeegoInput) Port() int {
} }
func (input *BeegoInput) UserAgent() string { func (input *BeegoInput) UserAgent() string {
return input.Header("HTTP_USER_AGENT") return input.Header("User-Agent")
} }
func (input *BeegoInput) Params(key string) string { func (input *BeegoInput) Params(key string) string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment