mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 12:36:40 +00:00
Add upstream_timeout as env-var
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
@ -65,7 +65,8 @@ func forwardRequest(w http.ResponseWriter, r *http.Request, proxyClient *http.Cl
|
||||
defer r.Body.Close()
|
||||
upstreamReq.Body = r.Body
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout-time.Second*1)
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
res, resErr := proxyClient.Do(upstreamReq.WithContext(ctx))
|
||||
|
Reference in New Issue
Block a user