You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rocket-nginx.conf
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -60,10 +60,8 @@ if ($rocket_hsts = "0") {
60
60
# index-mobile.html
61
61
# index-mobile-https.html
62
62
set $rocket_url "/wp-content/cache/wp-rocket/$http_host/$request_uri/index$rocket_https_prefix.html$rocket_encryption";
63
-
set $rocket_mobile_url "/wp-content/cache/wp-rocket/$http_host/$request_uri/index-mobile$rocket_https_prefix.html$rocket_encryption";
64
-
65
63
set $rocket_file "$document_root$rocket_url";
66
-
set $rocket_mobile_file "$document_root$rocket_mobile_url";
64
+
set $rocket_mobile_detection "/wp-content/cache/wp-rocket/$http_host/$request_uri/.mobile-active";
67
65
68
66
69
67
# Do not bypass if it's a POST request
@@ -87,14 +85,14 @@ if (-f "$document_root/.maintenance") {
87
85
# Do not bypass if one of those cookie if found
88
86
# wordpress_logged_in_[hash] : When a user is logged in, this cookie is created (we'd rather let WP-Rocket handle that)
89
87
# wp-postpass_[hash] : When a protected post requires a password, this cookie is created.
90
-
if ($http_cookie ~* "(wordpress_logged_in_|wp\-postpass_|woocommerce_items_in_cart|woocommerce_cart_hash)") {
88
+
if ($http_cookie ~* "(wordpress_logged_in_|wp\-postpass_|woocommerce_items_in_cart|woocommerce_cart_hash|wptouch_switch_toogle|comment_author_|comment_author_email_)") {
91
89
set $rocket_bypass 0;
92
90
set $rocket_reason "Cookie";
93
91
}
94
92
95
-
if (-f "$rocket_mobile_file") {
93
+
if (-f "$rocket_mobile_detection") {
96
94
set $rocket_bypass 0;
97
-
set $rocket_reason "Mobile/Desktop cache activated";
95
+
set $rocket_reason "Specific mobile cache activated";
0 commit comments