mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-01 04:40:54 +08:00
实现WAF统计
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"io"
|
||||
"io/fs"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -100,7 +101,8 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
|
||||
|
||||
stat, err := os.Stat(filePath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
_, isPathError := err.(*fs.PathError)
|
||||
if os.IsNotExist(err) || isPathError {
|
||||
if this.web.Root.IsBreak {
|
||||
this.write404()
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user