You have a broken reverse proxy config:
Adding a reverse proxy increase the maintenance burden, so should be done only when necessary, and will occasionally break.
A simpler approach, with less maintenance, is using Caddy as a reverse proxy server.
Discourse is using secure cookies now, and they are more sensitive to a broken proxy.