The docs are sadly silent on how to write a recursive matcher in Caddyfile.
For example, let’s say I want to return a
404 for any
/.git/ directory anywhere.
At the moment I have the following syntax:
error /.git/* 404 error /*/.git/* 404
But this does not work recursively, i.e. /test/test1/.git/test.txt will still display.
I also tried
error */.git/* 404 but that just returns
404 for everything.