1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:20:54 +00:00
This commit is contained in:
astaxie 2013-11-21 15:59:16 +08:00
parent b9fb88f537
commit f52faf63f7

View File

@ -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 {