Commit 98dcee06 authored by astaxie's avatar astaxie

Merge pull request #926 from xuewuhen/master

SubDomains function bugfixed
parents 0ad75cb5 c9bb9d6a
......@@ -198,7 +198,7 @@ func (input *BeegoInput) Refer() string {
// if aa.bb.domain.com, returns aa.bb .
func (input *BeegoInput) SubDomains() string {
parts := strings.Split(input.Host(), ".")
return strings.Join(parts[len(parts)-2:], ".")
return strings.Join(parts[:len(parts)-2], ".")
}
// Port returns request client port.
......
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