Detect if the response body is a Buffer before removing the security header