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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user