mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 16:58:54 +02:00
fix: middleware bypass
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/yusing/go-proxy/internal/net/gphttp/reverseproxy"
|
||||
"github.com/yusing/go-proxy/internal/route/routes"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -91,12 +91,12 @@ var staticReqVarSubsMap = map[string]reqVarGetter{
|
||||
return ""
|
||||
},
|
||||
VarRemoteAddr: func(req *http.Request) string { return req.RemoteAddr },
|
||||
VarUpstreamName: func(req *http.Request) string { return reverseproxy.TryGetUpstreamName(req) },
|
||||
VarUpstreamScheme: func(req *http.Request) string { return reverseproxy.TryGetUpstreamScheme(req) },
|
||||
VarUpstreamHost: func(req *http.Request) string { return reverseproxy.TryGetUpstreamHost(req) },
|
||||
VarUpstreamPort: func(req *http.Request) string { return reverseproxy.TryGetUpstreamPort(req) },
|
||||
VarUpstreamAddr: func(req *http.Request) string { return reverseproxy.TryGetUpstreamAddr(req) },
|
||||
VarUpstreamURL: func(req *http.Request) string { return reverseproxy.TryGetUpstreamURL(req) },
|
||||
VarUpstreamName: routes.TryGetUpstreamName,
|
||||
VarUpstreamScheme: routes.TryGetUpstreamScheme,
|
||||
VarUpstreamHost: routes.TryGetUpstreamHost,
|
||||
VarUpstreamPort: routes.TryGetUpstreamPort,
|
||||
VarUpstreamAddr: routes.TryGetUpstreamAddr,
|
||||
VarUpstreamURL: routes.TryGetUpstreamURL,
|
||||
}
|
||||
|
||||
var staticRespVarSubsMap = map[string]respVarGetter{
|
||||
|
||||
Reference in New Issue
Block a user