e1475b72 by astaxie

Merge pull request #826 from SnailKnows/patch-2

Update beego.go
2 parents f267ee8a 67c0c232
Showing 1 changed file with 4 additions and 0 deletions
......@@ -308,6 +308,10 @@ func SetStaticPath(url string, path string) *App {
// DelStaticPath removes the static folder setting in this url pattern in beego application.
func DelStaticPath(url string) *App {
if !strings.HasPrefix(url, "/") {
url = "/" + url
}
url = strings.TrimRight(url, "/")
delete(StaticDir, url)
return BeeApp
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!