mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-28 11:10:26 +08:00
WAF参数定义增加优先级,可以让“轻”任务优先执行
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type Checkpoint struct {
|
||||
priority int
|
||||
}
|
||||
|
||||
func (this *Checkpoint) Init() {
|
||||
@@ -36,6 +37,14 @@ func (this *Checkpoint) Stop() {
|
||||
|
||||
}
|
||||
|
||||
func (this *Checkpoint) SetPriority(priority int) {
|
||||
this.priority = priority
|
||||
}
|
||||
|
||||
func (this *Checkpoint) Priority() int {
|
||||
return this.priority
|
||||
}
|
||||
|
||||
func (this *Checkpoint) RequestBodyIsEmpty(req requests.Request) bool {
|
||||
if req.WAFRaw().ContentLength == 0 {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user