diff --git a/agent/pkg/agent/http_requests.go b/agent/pkg/agent/http_requests.go index ba0d9693..fa3b88bb 100644 --- a/agent/pkg/agent/http_requests.go +++ b/agent/pkg/agent/http_requests.go @@ -19,7 +19,6 @@ func (cfg *AgentConfig) Do(ctx context.Context, method, endpoint string, body io } func (cfg *AgentConfig) Forward(req *http.Request, endpoint string) (*http.Response, error) { - req = req.WithContext(req.Context()) req.URL.Host = AgentHost req.URL.Scheme = "https" req.URL.Path = APIEndpointBase + endpoint @@ -58,7 +57,7 @@ func (cfg *AgentConfig) Websocket(ctx context.Context, endpoint string) (*websoc // If the request has a query, it will be added to the proxy request's URL func (cfg *AgentConfig) ReverseProxy(w http.ResponseWriter, req *http.Request, endpoint string) error { rp := reverseproxy.NewReverseProxy("agent", nettypes.NewURL(AgentURL), cfg.Transport()) - uri := APIEndpointBase + endpoint + uri := endpoint if req.URL.RawQuery != "" { uri += "?" + req.URL.RawQuery }