Need help setting up discourse using Caddy as rproxy

That is probably due to upstream changes in Caddy itself. The image linked in the topic still works with the provided configuration afaik.