mirror of
https://github.com/astaxie/beego.git
synced 2024-11-29 11:11:33 +00:00
Merge pull request #3345 from dingyuanhong/develop
fix / can use dynamic directory
This commit is contained in:
commit
706c086bc5
@ -178,7 +178,7 @@ func searchFile(ctx *context.Context) (string, os.FileInfo, error) {
|
||||
if !strings.Contains(requestPath, prefix) {
|
||||
continue
|
||||
}
|
||||
if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {
|
||||
if prefix != "/" && len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {
|
||||
continue
|
||||
}
|
||||
filePath := path.Join(staticDir, requestPath[len(prefix):])
|
||||
|
Loading…
Reference in New Issue
Block a user