mirror of
https://github.com/portainer/portainer.git
synced 2025-07-29 18:29:44 +02:00
feat(api): write Docker response code when using local proxy (#1192)
This commit is contained in:
parent
f96b70841f
commit
d653391cdd
1 changed files with 3 additions and 0 deletions
|
@ -34,6 +34,9 @@ func (proxy *socketProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Add(k, v)
|
w.Header().Add(k, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w.WriteHeader(res.StatusCode)
|
||||||
|
|
||||||
if _, err := io.Copy(w, res.Body); err != nil {
|
if _, err := io.Copy(w, res.Body); err != nil {
|
||||||
httperror.WriteErrorResponse(w, err, http.StatusInternalServerError, nil)
|
httperror.WriteErrorResponse(w, err, http.StatusInternalServerError, nil)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue