Configure local reply format for ingress gateway

I am wondering if istio supports configuring local reply format like Local reply modification — envoy 1.20.0-dev-c88ec8 documentation.

I have a requirement that we need to format the envoy error response in JSON for the client.

                    "bodyFormat": {
                      "jsonFormat": {
                        "code": "%RESPONSE_CODE%",

Sorry that I didn’t find any docs about it.

Thank you.

No. Istio by default does not support it. But you can create an Envoy Filter to add that config to the listener of your choice.

Thanks! We were told to avoid envoy filter usages because it’s not a stable API and has risks. Do you think we can support this feature natively?