mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 06:59:50 +02:00
fix(middleware): fix route bypass matching
- replace upstream headers approach with context value
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user