I have now been in contact with them. In short:
- No, there is no possible snippet to flush the CDN cache
- They confirmed “Hostinger CDN currently doesn’t support cookie-based cache bypass, so logged-in users may see cached (logged-out) content”
The only solutions are:
- Disabling CDN completely
- Setting CDN in Development mode: “CDN stays in front (Anycast edge, TLS termination, WAF options, image optimization/minification if enabled), but it doesn’t cache—it forwards to origin each time.
I am testing the develpment mode. I imagine it will work. Hopefully in the future they add cookie based CDN bypass for logged in users.
Not sure if adding some code to Hivepress “requesting any website resource” will refresh hosting-side cache after login, but it is the only temporary fix that might work until they update themselves.
Hope this helps