fix(middleware): fix route bypass matching

- replace upstream headers approach with context value
This commit is contained in:
yusing
2025-05-08 17:49:36 +08:00
parent 1ce607029a
commit 75ee0e63bd
9 changed files with 116 additions and 77 deletions

View File

@@ -77,6 +77,9 @@ func (ep *Entrypoint) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return nil
})
}
if rp, ok := mux.(routes.ReverseProxyRoute); ok {
r = rp.ReverseProxy().WithContextValue(r)
}
if ep.middleware != nil {
ep.middleware.ServeHTTP(mux.ServeHTTP, w, r)
return