mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 09:16:48 +00:00
Pass along status code
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
7120e4c5f4
commit
fdc7f08ba2
@ -47,10 +47,15 @@ func MakeForwardingProxyHandler(proxy *types.HTTPClientReverseProxy, metrics *me
|
||||
defer res.Body.Close()
|
||||
}
|
||||
|
||||
// Populate any headers received
|
||||
for k, v := range res.Header {
|
||||
w.Header()[k] = v
|
||||
}
|
||||
|
||||
// Write status code
|
||||
w.WriteHeader(res.StatusCode)
|
||||
|
||||
// Copy the body over
|
||||
io.CopyBuffer(w, res.Body, nil)
|
||||
|
||||
seconds := time.Since(start).Seconds()
|
||||
|
Loading…
x
Reference in New Issue
Block a user