proxy different domain request to different host through specified proxy rules
no need nginx just go
import proxy "github.com/chenhg5/gin-reverseproxy"
router.Use(proxy.ReverseProxy(map[string] string {
"www.xyz.com" : "localhost:4001",
"www.abc.com" : "localhost:4003",
}))
- Load balance
- Error handle
- specified route