mirror of
https://github.com/discourse/discourse.git
synced 2025-04-25 23:44:32 +08:00
FIX: serve statically compressed files when available
PERF: default gzip to level 5
This commit is contained in:
parent
059c0ff5e1
commit
ebe3ee0b1c
@ -28,6 +28,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_min_length 1000;
|
gzip_min_length 1000;
|
||||||
|
gzip_comp_level 5;
|
||||||
gzip_types application/json text/css application/x-javascript application/javascript;
|
gzip_types application/json text/css application/x-javascript application/javascript;
|
||||||
|
|
||||||
server_name enter.your.web.hostname.here;
|
server_name enter.your.web.hostname.here;
|
||||||
@ -61,6 +62,7 @@ server {
|
|||||||
|
|
||||||
location ~ ^/assets/ {
|
location ~ ^/assets/ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
|
gzip_static on;
|
||||||
add_header ETag "";
|
add_header ETag "";
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user