fix: pass original http response code to proxy response (#1772)

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Lenin Alevski
2022-03-28 17:19:15 -07:00
committed by GitHub
parent 70214a6578
commit ceeacd2167

View File

@@ -255,6 +255,8 @@ func serveProxy(responseWriter http.ResponseWriter, req *http.Request) {
// Allow iframes
responseWriter.Header().Set("X-Frame-Options", "SAMEORIGIN")
responseWriter.Header().Set("X-XSS-Protection", "1; mode=block")
// Pass HTTP status code to proxy response
responseWriter.WriteHeader(resp.StatusCode)
io.Copy(responseWriter, resp.Body)