Skip to content

Commit 83fe382

Browse files
author
Maxime Jobin
committed
Leave a header even if debug is false. Tested with lastest WP-Rocket version (2.6.4)
1 parent 35495e8 commit 83fe382

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

rocket-nginx.conf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
###################################################################################################
22
# Rocket-Nginx
3-
#
3+
#
44
# Rocket-Nginx is a NGINX configuration to speedup your WordPress
55
# website with the cache plugin WP-Rocket (http://wp-rocket.me)
66
#
77
# Author: Maxime Jobin
88
# URL: https://github.com/maximejobin/rocket-nginx
99
#
10-
# Tested with WP-Rocket version: 2.5.11
10+
# Tested with WP-Rocket version: 2.6.4
1111
# Tested with NGINX: 1.8.0 (stable)
1212
#
13-
# Version 1.0
13+
# Version 1.0.1
1414
#
1515
###################################################################################################
1616

@@ -24,7 +24,7 @@ set $rocket_encryption ""; # Is GZIP accepted by client ?
2424
set $rocket_file ""; # Filename to use
2525
set $rocket_is_bypassed "No"; # Header text added to check if the bypass worked or not. Header: X-Rocket-Nginx-Bypass
2626
set $rocket_reason ""; # Reason why cache file was not used. If cache file is used, what file was used
27-
set $https_prefix "";
27+
set $https_prefix ""; # HTTPS prefix to use when cached files are using HTTPS
2828

2929

3030
###################################################################################################
@@ -78,15 +78,14 @@ if (!-f "$rocket_file") {
7878
set $rocket_reason "File not cached";
7979
}
8080

81-
# If the bypass token is still on, let's bypass WordPress with the cached URL
81+
# If the bypass token is still on, let's bypass WordPress with the cached URL
8282
if ($rocket_bypass = 1) {
8383
set $rocket_is_bypassed "Yes";
8484
set $rocket_reason "$rocket_url";
8585
}
8686

8787
# Clear variables if debug is not needed
8888
if ($rocket_debug = 0) {
89-
set $rocket_is_bypassed "";
9089
set $rocket_reason "";
9190
set $rocket_file "";
9291
}
@@ -144,7 +143,7 @@ location ~ /wp-content/cache/min/.*\.js$ {
144143

145144
###################################################################################################
146145
# BROWSER MEDIA CACHE
147-
#
146+
#
148147
location ~* \.(ico|gif|jpe?g|png|svg|eot|otf|woff|woff2|ttf|ogg)$ {
149148
expires max;
150149
}

0 commit comments

Comments
 (0)