diff --git a/tools/remote_caller.go b/tools/remote_caller.go index b6aac28..a6bd595 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -121,7 +121,7 @@ func (caller *HTTPCaller) CallPut(url string, subpath string, body map[string]in } // CallRaw calls the Raw method on the HTTP server -func (caller *HTTPCaller) CallRaw(method string, url string, subpath string, body map[string]interface{}, content_type string) (*http.Response, error) { +func (caller *HTTPCaller) CallRaw(method string, url string, subpath string, body map[string]interface{}, content_type string, fakeTLSTermination bool) (*http.Response, error) { postBody, _ := json.Marshal(body) responseBody := bytes.NewBuffer(postBody) req, err := http.NewRequest(method, url+subpath, responseBody) @@ -129,6 +129,9 @@ func (caller *HTTPCaller) CallRaw(method string, url string, subpath string, bod return nil, err } req.Header.Set("Content-Type", content_type) + if fakeTLSTermination { + req.Header.Add("X-Forwarded-Proto", "https") + } client := &http.Client{} return client.Do(req) }