mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:20:55 +00:00
commit
e1475b72b9
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