Commit e1475b72 authored by astaxie's avatar astaxie

Merge pull request #826 from SnailKnows/patch-2

Update beego.go
parents f267ee8a 67c0c232
......@@ -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
}
......
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