mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
Proxy: Better errors + remote custom TLS (#1197)
Proxy will be more verbose on errors + possibility to configure custom transport (example: for custom TLS certificates)
This commit is contained in:
committed by
Vishal Rana
parent
fcdf096c2c
commit
bc37a3a792
13
middleware/proxy_1_11_n.go
Normal file
13
middleware/proxy_1_11_n.go
Normal file
@ -0,0 +1,13 @@
|
||||
// +build !go1.11
|
||||
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
)
|
||||
|
||||
func proxyHTTP(t *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
|
||||
return httputil.NewSingleHostReverseProxy(t.URL)
|
||||
}
|
Reference in New Issue
Block a user