Fix file not exist panic in StaticFilter()

This commit is contained in:
Yang Luo 2023-07-30 19:03:21 +08:00
parent 55c522d3b7
commit 2fb9674171

View File

@ -64,6 +64,9 @@ func StaticFilter(ctx *context.Context) {
if !util.FileExist(path) {
path = "web/build/index.html"
}
if !util.FileExist(path) {
return
}
if oldStaticBaseUrl == newStaticBaseUrl {
makeGzipResponse(ctx.ResponseWriter, ctx.Request, path)