Skip to content

Commit

Permalink
feat: improve StaticFilter()
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Dec 5, 2023
1 parent 8819a86 commit 482eb61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/static_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func StaticFilter(ctx *context.Context) {
path += urlPath
}

if !util.FileExist(path) {
if strings.Contains(path, "/../") || !util.FileExist(path) {
path = webBuildFolder + "/index.html"
}
if !util.FileExist(path) {
Expand Down

0 comments on commit 482eb61

Please sign in to comment.