Browse Source

Added Proxy() convenience method.

multiapp-subsubapp
Benjamin Shelton 3 months ago
parent
commit
fdcdf6908d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      router.go

+ 5
- 0
router.go View File

@@ -285,6 +285,11 @@ func (r *Router) Mux() chi.Router {
return r.mux
}

// Proxy returns the ProxyHandler associated with this Router instance.
func (r *Router) Proxy() ProxyHandler {
return r.proxy
}

func (r *Router) ServeHTTP(w http.ResponseWriter, rq *http.Request) {
r.proxy.ServeHTTP(w, rq)
}


Loading…
Cancel
Save