Comments (10)
@centminmod
i think i've figured it out.
I added wc-ajax to the bypass rules in:
wpcacheenabler_mydomain.com.conf
# bypass cache if URLs containing the following strings
if ($request_uri ~* "(\?add-to-cart=|\?wc-ajax=|\?wc-api=|/cart/|/my-account/|/checkout/|/shop/checkout/|/wp-json/|/store/checkout/|/customer-dashboard/|/addons/|/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'nullcache';
}
not sure why this rule is needed given you already have this a bit further up
# bypass cache if POST requests or URLs with a query string
if ($request_method = POST) {
set $cache_uri 'nullcache';
}
and the request in question is a post request
698:188.141.52.86 - - [04/May/2021:13:24:03 +0000] "POST /?wc-ajax=get_refreshed_fragments HTTP/2.0" 405 552 "https://snip/product/shorts-with-a-tie-belt/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"
from centminmod.
Nice troubleshooting! Could be the order of the rules so will add wc-ajax to bypass $request_uri rule too :)
from centminmod.
added fix to 123.09beta01 d29de85 :)
from centminmod.
which version of cache enabler are you using 1.4.9 or 1.5.1+. If you're using 1.5.1+, tried downgrading to cache enabler 1.4.9 https://community.centminmod.com/threads/add-cache-enabler-1-4-9-legacy-cache-mode-option-in-123-09beta01.20545/ ?
cache enabler 1.5.1+ changed the way they cache for query strings keycdn/cache-enabler#148 so you might want to check with cache enabler support too to see if other folks reporting similar issues at https://wordpress.org/support/plugin/cache-enabler/ and https://github.com/keycdn/cache-enabler/issues
if downgrading to cache enabler 1.4.9 fixes the issue, might want to chime in on keycdn/cache-enabler#148 to make it known 1.5.1+ has issues
from centminmod.
also does manually clearing cache enabler cache, fix the ?wc-ajax requests temporarily ? or has ?wc-ajax requests always been 405 since day 1?
I ask as once you add something into your cart, the ?wc-ajax request is 200 status as the cookie forces as cache bypass due to presence of woocommerce_items_in_cart=1
cookie AFAIK
from centminmod.
hey @centminmod
Sorry I should have led with that info!
I'm running 1.4.9 of Cache Enabler.
I spotted your threads on the big changes to Cache Enabler when I was updating another WP install last week (sidnote: I think the change to caching query strings by default is not going to end well! So many plugins rely on query strings!).
Clearing cache doesn't solve it - it's been like that since Day 1. (this is a brand new machine I just setup over the weekend).
from centminmod.
hey @centminmod
just a quick update on this.
created another brand new machine following the steps listed above and this is still an issue.
from centminmod.
@colmtroy I'll take a look but I don't have much experience with Woocommerce myself.
from centminmod.
oh i checked in latest wpcacheenabler_domain.com.conf templates, the POST request bypass is higher up before the bypass URL rules so shouldn't be the case - if you did fresh install it would of been the same case
from centminmod.
Awesome thanks as always @centminmod :)
from centminmod.
Related Issues (20)
- Be docker compatible with centos HOT 2
- Support Centos 8 ? HOT 3
- README licence badge reads 'AGPL' HOT 1
- Feedback and suggestions HOT 3
- Update well-acme of drop.conf HOT 10
- OPcache on shared hosting HOT 1
- From acme.sh v3.0.0, acme.sh is using Zerossl as default ca, instead of LetsEncrypt and this breaks the vhost add functionality with LetsEncrypt HOT 3
- Custom SSL SELFSIGNEDSSL_O (Organization (O)) and SELFSIGNEDSSL_OU (Organizational Unit (OU)) variables ignored when requesting ssl certificate
- -bash: grepย -rnw: command not found HOT 1
- Option to Add Nginx vhost fails to generate LetsEncrypt certificate if domain has AAAA ipv6 address configured HOT 3
- Dual-core CPU cannot open php PGO extension HOT 2
- How to strip tracking parameters via nginx? HOT 1
- installer broken it doesn't install everything HOT 12
- CSS / readability issue on "Quick Curl Installer" HOT 2
- broken INDEX.HTML PLACE HOLDER page HOT 1
- Problem with WP-CLI after fresh installation HOT 5
- phpswoole option not bundling swoole PHP extension
- phpmyadmin install error (node, npm) HOT 4
- Forum registration API problem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from centminmod.