Skip to content

Commit 0e19db2

Browse files
committed
Use gzip_vary instead of add_header
1 parent b7b8fd0 commit 0e19db2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rocket-nginx.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ set $rocket_file "$document_root$rocket_url";
4343
# Do not bypass if it's a POST request
4444
if ($request_method = POST) {
4545
set $rocket_bypass 0;
46-
set $rocket_reason "POST detected";
46+
set $rocket_reason "POST request";
4747
}
4848

4949
# Do not bypass if arguments are found (e.g. ?page=2)
@@ -108,7 +108,7 @@ location ~ /wp-content/cache/wp-rocket/.*_gzip$ {
108108
# BROWSER CSS CACHE
109109
#
110110
location ~ /wp-content/cache/min/.*\.css$ {
111-
add_header Vary "Accept-Encoding";
111+
gzip_vary on;
112112
expires 30d;
113113
}
114114

@@ -117,14 +117,14 @@ location ~ /wp-content/cache/min/.*\.css$ {
117117
# BROWSER JS CACHE
118118
#
119119
location ~ /wp-content/cache/min/.*\.js$ {
120-
add_header Vary "Accept-Encoding";
120+
gzip_vary on;
121121
expires 30d;
122122
}
123123

124124

125125
###################################################################################################
126-
# BROWSER IMAGES CACHE
126+
# BROWSER MEDIA CACHE
127127
#
128-
location ~* \.(ico|gif|jpe?g|png)$ {
128+
location ~* \.(ico|gif|jpe?g|png|svg|eot|otf|woff|ttf|ogg)$ {
129129
expires 30d;
130130
}

0 commit comments

Comments
 (0)