I’m running Caddy 0.10.14 on Ubuntu 18.04. I have a Caddyfile like:
www.example.com {
root /var/www/html
gzip
templates
log /var/log/access.log
errors /var/log/error.log {
* error.html
}
}
I’ve noticed that templates work throughout the site, but not on the custom error page at error.html. For instance, the example:
Welcome {{.IP}}! You're visiting {{.URI}}.
… does not work on the custom error page. Instead it displays the literal strings (like “{{.IP}}”) on the page. The same example works elsewhere on the same site.
Is this a known limitation? Or a bug?
I’ve read both https://caddyserver.com/docs/errors and https://caddyserver.com/docs/templates and can’t make sense of the behavior. Thanks.