mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:20:59 +00:00
fix #304
This commit is contained in:
parent
b9fb88f537
commit
f52faf63f7
@ -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 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user