(cherry picked from commit fba90b8f9b)
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
This commit is contained in:
co-authored by
Sofia Papagiannaki
parent
a95c3419b7
commit
557c310c8c
@@ -118,6 +118,10 @@ func (p *AlertingProxy) withReq(
|
||||
errMessage = message.(string)
|
||||
}
|
||||
}
|
||||
} else if strings.HasPrefix(resp.Header().Get("Content-Type"), "text/html") {
|
||||
// if Content-Type is text/html
|
||||
// do not return the body
|
||||
errMessage = "redacted html"
|
||||
}
|
||||
return ErrResp(status, errors.New(errMessage), "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user