Skip to main content

http_response_modifier

Function http_response_modifier 

Source
pub fn http_response_modifier(_req: &GatewayRequest, resp: &mut GatewayResponse)
Expand description

Modifies the HTTP response based on metadata headers.

Specifically, it looks for an x-http-code header (which may have been mapped from gRPC metadata by the upstream service) and uses it to override the HTTP status code. It then removes the header to prevent leaking implementation details.