Refreshing Web Page Logs Out the User When Using Traefik in Docker Swarm
1. Introduction If you use Traefik as the reverse proxy in a Docker Swarm cluster, and your application is server-side rendered (SSR), you may encounter the following issue: You can log in successfully But when you refresh the page or navigate to another page, you are suddenly logged out The behavior feels random: sometimes it works, sometimes it doesn’t This issue usually does not appear: when running the app locally when using only one container before scaling the service in Docker Swarm Once you add multiple replicas, the problem starts to show up. This post will explore the reasons behind this behavior and how to effectively address it. ...