func setRequestXCfInstanceId(request *http.Request, endpoint *route.Endpoint) { value := endpoint.PrivateInstanceId if value == "" { value = endpoint.CanonicalAddr() } request.Header.Set(router_http.CfInstanceIdHeader, value) }
func (h *RequestHandler) setupRequest(endpoint *route.Endpoint) { h.setRequestURL(endpoint.CanonicalAddr()) h.setRequestXForwardedFor() setRequestXRequestStart(h.request) setRequestXVcapRequestId(h.request, h.StenoLogger) }
func (rt *BackendRoundTripper) setupRequest(request *http.Request, endpoint *route.Endpoint) { rt.handler.Logger().Debug("proxy.backend") request.URL.Host = endpoint.CanonicalAddr() request.Header.Set("X-CF-ApplicationID", endpoint.ApplicationId) setRequestXCfInstanceId(request, endpoint) }