You can prevent a lot of leaking by doing the following
- set up a proxy server like Tinyproxy on a different VPS
- set the environment variable
HTTPS_PROXYandHTTP_PROXYso Discourse will use that (set them in theenvsection of yourapp.yml) - set
NO_PROXY='127.0.0.1, localhost, <internal-network>'
See also Install discourse with internet access only via proxy, Configuration outbound proxy and Discourse Link previews through a proxy server? - #14 by supermathie
Also, when you’re behind CF, you can modify the firewall on your Discourse host to only allow incoming traffic from your Cloudflare IPs (and the host you access it from yourself)