Bypass cache for Logged in users

Hello,

I need help to bypass cache after users log in.
I have made some configurations and I was told : “…you require a Worker that bypasses cache for login cookies.”
Check thread here : Handling users sessions properly & reducing TTFB
The above thread points to the below article :
cf-workers/cache-bypass-on-cookie at master · pmeenan/cf-workers · GitHub

The readme talks about Wordpress but my site is a Joomla site. So it’s a bit confusing. Anyone knows whether the script will work with Joomla ? If so how to implement the script ?

I believe you would have to determine which cookies does the Joomla use and then inside the const BYPASS_COOKIE_PREFIXES = [ ... ] add them.

Furthermore, I believe inside the const BYPASS_URL_PATTERNS = [ ... ] you would have to add the Joomla /administrator/ and other related paths.

Using a Cloudflare Worker - you can create one and add the above code, then modify it, setupp a route by using the Cloudflare Dashboard (no need for the CLI, etc):

1 Like

Hello Fritex and thanks,

I believe you would have to determine which cookies does the Joomla use and then inside the const BYPASS_COOKIE_PREFIXES = [ ... ] add them.
Furthermore, I believe inside the const BYPASS_URL_PATTERNS = [ ... ] you would have to add the Joomla /administrator/ and other related paths.

Am not a coder. I can see the cookies in Dev tools but don’t know what to do next…

Using a Cloudflare Worker - you can create one and add the above code, then modify it, setupp a route by using the Cloudflare Dashboard (no need for the CLI, etc): * https://developers.cloudflare.com/workers/get-started/guide/

The whole documentation is about CLI so am a bit confused here.

Anyway can I get someone implement this for me ?
The website is a non commercial website (explora.mu) which primary goal is to help amateur photographers share their photos. Even though there is no budget, I am ready to pay to get this done :wink:

Hello,

After further investigation. I have found the following in FF Dev tools :

Any hint what I can replace in the script here (which is meant for WordPress) ?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.