The documentation on environment variables only talks about Caddyfile format:
Also, in the Placeholders section in the documentation, it suggests to use curly braces: {env.*}. It’s not clear, however, whether I can use it the same way in the JSON file? For example:
Yes, that should work. But only in config locations where the module actually executes the replacer (the internal mechanism for finding and transforming placeholders into actual values). Not all modules and config properties use the replacer. Luckily though, the upstream dial addresses do get passed through the replacer.
If I rollback to specifying the host directly, it works again.
If I use interpolation {env.PRIMARY_HOST}, the reponse Caddy gives is an absolutely empty page. The logs don’t indicate any issues. So I’m not sure how to investigate what’s going on. Ideas?