Thanks Harry,
I tried the steps mentioned in the Nginx directive injection doc.
I added below configuration in /etc/kong/kong.conf file
nginx_proxy_gzip = on
nginx_proxy_gzip_comp_level = 5
nginx_proxy_gzip_min_length = 256
nginx_proxy_gzip_proxied = any
nginx_proxy_gzip_vary = on
and then restart kong.
Still I am not getting compressed response.
I checked /usr/local/kong/nginx-kong.conf file.
This file have my configuration setting that I added in kong.conf file.
@Vikas_Agarwal I think you are setting the configurations on the wrong context. Those directives doesn’t work on proxy context, the are for: http , server , location , if in location. Ref: ngx_module.
You can set them on Kong by envs:
KONG_NGINX_HTTP_GZIP=“on”
KONG_NGINX_HTTP_COMP_LEVEL=5
…