98dcee06 by astaxie

Merge pull request #926 from xuewuhen/master

SubDomains function bugfixed
2 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.
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!