mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-02 03:16:45 +02:00
fix: typo in dynamic_router.go
SniffResultAccpet should be SniffResultAccept
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
|||||||
type SniffResult int
|
type SniffResult int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SniffResultAccpet SniffResult = iota // Forward the request to this plugin dynamic capture ingress
|
SniffResultAccept SniffResult = iota // Forward the request to this plugin dynamic capture ingress
|
||||||
SniffResultSkip // Skip this plugin and let the next plugin handle the request
|
SniffResultSkip // Skip this plugin and let the next plugin handle the request
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ func (p *PathRouter) RegisterDynamicSniffHandler(sniff_ingress string, mux *http
|
|||||||
payload.rawRequest = r
|
payload.rawRequest = r
|
||||||
|
|
||||||
sniffResult := handler(&payload)
|
sniffResult := handler(&payload)
|
||||||
if sniffResult == SniffResultAccpet {
|
if sniffResult == SniffResultAccept {
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
w.Write([]byte("OK"))
|
w.Write([]byte("OK"))
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user