I'm just testing on the Google platform and have a a couple Nginx VM's behind an LB set up which caches to GCDN globally. I want to bypass the cache for users that are logged in (with a wordpress cookie).
What is the best strategy for this? Up until now I've been using VM's -> Varnish -> Cloudflare and bypassed Varnish's cache based on the cookie. I wrote some workers code to do the same for Cloudflare. However, with GCDN/GLB there seems to only be functionality for sticky sessions/cookies which isn't applicable for what I need to do.
I can obviously use nginx to detect the cookie and set Cache-Control: no cache
headers to prevent caching but if the pages are already in the cache that boat has sailed. Any advice is appreciated here, cheers.