GZIP seems to be being disabled


#1

Hi,

the output from our API is quite heavy and we would like to GZIP the json before sending it back to the client.
On our MAMP stack Apache seems to be able to GZIP the content automatically.

We have set up the same application on our production servers and now Apache does’nt seem to be able to compress the output from SLIM.

Do we need to implement a middleware that does the gzipping by hand? Or is there something that we can switch on/off?

Thanks


#2

You can check if GZIP is disabled and use a middleware as fallback:

GZIP Middleware for Slim


#3

Thanks for the quick response!
GZIP is enabled on the server and if we build a simple php page the output is compressed.
With api calls though it feels almost as if the framework is disabling the gzip compression.
Not sure where though.

We will look into using the middleware.

Thanks again