I'm using a Unix socket between Caddy and Discourse instead of TCP, but from time to time I get a 'unix:' error

This means that a request / user has a remote ip pointing to your socket, which means something in your proxy chain is misconfigured.