With Traffic Policy, you can ensure all JSON responses returned by your upstream services are compressed en route to the API consumer. This rule compresses JSON responses using the gzip, br, deflate, and compress algorithms.
If your upstream service already handles compression, ngrok skips this step.
on_http_response:
  -     name: Add compression
    actions:
      -         type: compress-response
        config:
          algorithms:
            - gzip
            - br
            - deflate
            - compress
See the compress-response Traffic Policy action docs for more information.