Http compression enabled but response not compressed

Closing this thread. As you wrote on the issue you are actually using a 3rd party tool which does not ask for compression on remote hosts but only on localhost:

It indeed compresses on hosts other than localhost when issuing the requests with curl, however when using postman or a web browser it does not. Not really sure what this could be caused by.

@tanguy ran a test which shows that everything is normal as soon as the client ask for it:

Quick test I did on 5.6.2:

$ cat config/elasticsearch.yml | grep network
network.host: ["localhost","127.0.0.1","192.168.1.15"]

Now testing with curl with no Accept-Encoding header on http://localhost:9200, http://127.0.0.1:9200, http://192.168.1.15:9200 and http://laptop:9200 all return the same response headers:

curl -v -H 'Content-Type: application/json' -XGET 'http://localhost:9200/_nodes/settings?pretty&filter_path=cluster_name' 

* Connected to localhost (127.0.0.1) port 9200 (#0)
> GET /_nodes/settings?pretty&filter_path=cluster_name HTTP/1.1
> Host: localhost:9200
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json

< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-length: 39
< 
{
  "cluster_name" : "elasticsearch"
}

The test but with Accept-Encoding: gzip header returns:

curl -v -H 'Content-Type: application/json' -H 'Accept-Encoding: gzip' -XGET 'http://localhost:9200/_nodes/settings?pretty&filter_path=cluster_name'

* Connected to localhost (127.0.0.1) port 9200 (#0)
> GET /_nodes/settings?pretty&filter_path=cluster_name HTTP/1.1
> Host: localhost:9200
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Accept-Encoding: gzip

< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-encoding: gzip
< content-length: 65
< 
��RPPJ�)-.I-��K�MUR�RPJ�I,.�L.NM,J�P�������m,'%      

I have the same result if I use http://127.0.0.1:9200, http://192.168.1.15:9200 and http://laptop:9200 and I think this is the expected behaviour.