feat: improve StaticFilter()

This commit is contained in:
Yang Luo 2023-12-05 18:32:54 +08:00
parent 8819a8697b
commit 482eb61168

View File

@ -129,7 +129,7 @@ func StaticFilter(ctx *context.Context) {
path += urlPath path += urlPath
} }
if !util.FileExist(path) { if strings.Contains(path, "/../") || !util.FileExist(path) {
path = webBuildFolder + "/index.html" path = webBuildFolder + "/index.html"
} }
if !util.FileExist(path) { if !util.FileExist(path) {