Skip to content

Commit

Permalink
fix: force gzip compression, closes #3020
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jun 24, 2024
1 parent 2eeca01 commit 6c626fb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

This is a log of major user-visible changes in each phpMyFAQ release.

### phpMyFAQ v3.2.8 - unreleased

- fixed minor bugs (Thorsten)

### phpMyFAQ v3.2.7 - 2024-06-07

- updated and improved cookie consent (Jan Harms, Thorsten, Zięba Bogusław Chaffinch)
Expand Down
10 changes: 10 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ server {
rewrite // / break;
rewrite ^/$ /index.php last;

# Gzip Settings
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
gzip_comp_level 6;
gzip_vary on;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

# Rewrite logging, should be turned off on production
rewrite_log on

Expand Down
24 changes: 24 additions & 0 deletions phpmyfaq/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,30 @@ Header always append X-Frame-Options SAMEORIGIN
Header set Pragma "no-cache"
</filesMatch>

# Set Gzip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>

# if you want to use mod_rewrite, set this 'On'
RewriteEngine On
Expand Down

0 comments on commit 6c626fb

Please sign in to comment.