Slide 15
Slide 15 text
Go reverse proxy
director := func(req *http.Request) {
xPrNumber := req.Header.Get("X-FOOBAR-PR")
apisPort := 4000
req.URL.Scheme = "http"
if xPrNumber != "" {
req.URL.Host = fmt.Sprintf("foobar-api-%s:%d",
xPrNumber, apisPort)
} else {
req.URL.Host = fmt.Sprintf("foobar-api:%d",
apisPort)
}