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:
parent
ad6003a38d
commit
8427ac4b4f
@ -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
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user