Unable to login when cloudflare edge cache TTL is enabled


I created a Cloudflare rule to enable edge cache TTL. But after enabling, admin and users were not able to log in to their account. I got an Authorization timeout or you have switched browsers. Please try again error when I tried to log in. After removing the rule and clearing the browser cache I was able to log in.

I know that discourse doesn’t encourage cloudflare. But Is there is any way to enable both dynamic and static caching in Cloudflare? What could have gone wrong which leads to this error?

Thank You