1f6e689e by astaxie

beego: fix #652

1 parent af4f1538
......@@ -7,6 +7,7 @@ package beego
import (
"net/http"
"strings"
beecontext "github.com/astaxie/beego/context"
"github.com/astaxie/beego/middleware"
......@@ -258,9 +259,11 @@ func addPrefix(t *Tree, prefix string) {
}
for _, l := range t.leaves {
if c, ok := l.runObject.(*controllerInfo); ok {
if !strings.HasPrefix(c.pattern, prefix) {
c.pattern = prefix + c.pattern
}
}
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!