1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Updating nginx config with gzip compression #437

This commit is contained in:
Patrik J. Braun 2023-01-07 17:55:22 +01:00
parent ad6003a38d
commit 8427ac4b4f
2 changed files with 44 additions and 5 deletions

View File

@ -36,6 +36,28 @@ http {
## ##
gzip on; gzip on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types
text/css
text/plain
text/javascript
text/markdown
application/javascript
application/json
application/gpx+xml
application/x-javascript
application/xml
application/xml+rss
application/xhtml+xml
application/x-font-ttf
application/x-font-opentype
application/vnd.ms-fontobject
image/svg+xml
image/x-icon
application/rss+xml
application/atom_xml;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
## ##
@ -53,8 +75,6 @@ http {
server { server {
server_name yourdomain.com; # CHANGE ME server_name yourdomain.com; # CHANGE ME
gzip on;
# Only allow all methods (GET,POST,PUT,etc..) for root (/pgapi). # Only allow all methods (GET,POST,PUT,etc..) for root (/pgapi).
# see https://github.com/bpatrik/pigallery2/issues/214 # see https://github.com/bpatrik/pigallery2/issues/214

View File

@ -36,6 +36,28 @@ http {
## ##
gzip on; gzip on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types
text/css
text/plain
text/javascript
text/markdown
application/javascript
application/json
application/gpx+xml
application/x-javascript
application/xml
application/xml+rss
application/xhtml+xml
application/x-font-ttf
application/x-font-opentype
application/vnd.ms-fontobject
image/svg+xml
image/x-icon
application/rss+xml
application/atom_xml;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
## ##
@ -53,9 +75,6 @@ http {
server { server {
server_name yourdomain.com; # CHANGE ME server_name yourdomain.com; # CHANGE ME
gzip on;
# Only allow all methods (GET,POST,PUT,etc..) for root (/pgapi). # Only allow all methods (GET,POST,PUT,etc..) for root (/pgapi).
# see https://github.com/bpatrik/pigallery2/issues/214 # see https://github.com/bpatrik/pigallery2/issues/214
location /pgapi { location /pgapi {