My application is running on WildFly application server with NGINX proxy server on front. I have enabled gzip on WildFly and everything working fine when I access WildFly directly. But when I accessed via proxy there is content-encoding: gzip header in response. So I added gzip configuration in nginx and it worked. So what is the best method to enable gzip when you application is fronted with proxy server?