Cloudflare and Ghost - bypass cookies

Does anyone has expirience with - Cloudflare Worker to bypass cookies for Ghost:

Ghost blog login not working with cache everything

The problem is related to members and login.

The sample worker for Wordpress is posted below:

For members, you can check for ghost-members-ssr, and for staff, you can check for ghost-admin-api-session

Do you mean that change of:

// Cookie prefixes that cause a request to bypass the cache when present.
const BYPASS_COOKIE_PREFIXES = [
  "wp-",
  "wordpress",
  "comment_",
  "woocommerce_"
];

// URL paths to bypass the cache (each pattern is a regex)
const BYPASS_URL_PATTERNS = [
  /\/wp-admin\/.*/
];

to:

// Cookie prefixes that cause a request to bypass the cache when present.
const BYPASS_COOKIE_PREFIXES = [
  "ghost-members-ssr",
  "admin-api-session"
];

// URL paths to bypass the cache (each pattern is a regex)
const BYPASS_URL_PATTERNS = [
  /\/ghost\/.*/
];

will be enough

You’re on the right track, but you the bypass patterns could cause issues with members.

ghost-admin-api-session should bypass /\/ghost\/.*/
ghost-members-ssr should bypass /\/.*/

Thank you very much for sharing.
I’m experimenting with your suggestions.

Will come back when I have results.
Also will post in the thread.

Greetings.