GravityX0
GravityX0

Reputation: 15

Adding GZIP compression to Bolt CMS

Id like to GZIP compress my output from Bolt CMS.

I have had a look in YAML files and there doesnt seem to be a setting.

is there a way to do this ?

Upvotes: 0

Views: 385

Answers (1)

Gawain
Gawain

Reputation: 1568

This is not done at the application layer, rather in your web server configuration for that virtual site.

In Apache something similar to this should work:

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|css|php|txt)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

Upvotes: 1

Related Questions