Magento 2: login problem

I am facing with a login problem on Magento 2 website.

I am caching the website with the following settings: Browser Cache TTL: a day, Cache Level: Cache Everything, Edge Cache TTL: a day

Now i have a problem when the customer logs in the login status at the top of the page does not change from buttons “Login” and “Create Account” to “Logout” and “My Profile”. Is there any way to bypass the header or something similar?

Is your Magento 2 also using a Varnish cache setup?
Do you use any module/addon for Magento 2 for Cloudflare?

A search through the Help Center has a bit of information, tips & tricks and issues other people have:


If using Cache Everything and having users to login, you would need to configre a Page Rules and considering to bypass cache on cookie request using Cloudflare Page Rules, which is possible on Business and Enterprise plan:

Or you can try to setup a “page cache” at your origin, and make Cloudflare to “respect origin cache”.

Cloudflare by default caches the static content. Please check the documentation on the link below:

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