Commit c9bb9d6a authored by xuewuhen's avatar xuewuhen

SubDomains function bugfixed

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