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 { ...@@ -198,7 +198,7 @@ func (input *BeegoInput) Refer() string {
198 // if aa.bb.domain.com, returns aa.bb . 198 // if aa.bb.domain.com, returns aa.bb .
199 func (input *BeegoInput) SubDomains() string { 199 func (input *BeegoInput) SubDomains() string {
200 parts := strings.Split(input.Host(), ".") 200 parts := strings.Split(input.Host(), ".")
201 return strings.Join(parts[len(parts)-2:], ".") 201 return strings.Join(parts[:len(parts)-2], ".")
202 } 202 }
203 203
204 // Port returns request client port. 204 // 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!