mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 05:11:31 +00:00
Update beego.go
This commit is contained in:
parent
6c62198b59
commit
67c0c232a1
4
beego.go
4
beego.go
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user