How to bypass URLs with a query string component

My site runs the WooCommerce Social Login plugin and we are having some issues with signing in with our social providers and the current caching configuration. The developers of the plugin have asked us to place a cache exception for the /wc-api/ endpoint and the wc-api query argument, along with ensuring that wp_woocommerce_session* cookies are not cached.

I figured out how to add a Page Rule for the /wc-api/ endpoint but how do I create a Page Rule which would capture any URL path that includes the wc-api query argument?

Assuming that the query strings always contain the string “wc-api”, you could try this:

URL: /*?*wc-api*

If the string wc-api is the path component but the query strings have different content, you could try:

URL: /wc-api/*?*

(In this case the first * would only be neded if the path could have other components between /wc-api/ and the question mark.)

This topic was automatically closed after 30 days. New replies are no longer allowed.