Does wp-.*.php exclude a plugin PHP file too?
-
Hi, we make Cookie Rocks, a cookie consent plugin for WordPress. Our banner asks a small endpoint for the visitor’s country, so it must never be cached: a PHP file in our plugin folder (/wp-content/plugins/cookie-rocks-banner/geo.php, which does not load WordPress) and a REST route (/wp-json/cookie-rocks/v1/geo). Both send Cache-Control: private, no-cache, no-store, max-age=0, plus X-Accel-Expires: 0, Surrogate-Control: no-store, CDN-Cache-Control: no-store and do-not-cache: true. In our tests, an Nginx cache that ignored Cache-Control served one visitor’s country to another.
Your default exclusions include /wp-json/ and wp-.*.php. Does that pattern match the whole URL, so /wp-content/plugins/…/geo.php is excluded too, or only root files like wp-login.php?
Thanks for your help,
Ben, Cookie Rocks
You must be logged in to reply to this topic.