mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:10:56 +00:00
Merge pull request #926 from xuewuhen/master
SubDomains function bugfixed
This commit is contained in:
commit
98dcee0643
@ -198,7 +198,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.
|
||||||
|
Loading…
Reference in New Issue
Block a user