$ is what’s called an anchor; specifically, the end anchor. It signifies the end of line. ^ is the beginning anchor (start of line).
.* means zero or more of any character.
In the context of web requests, they are effectively meaningless and cancel each other out - you could remove any instance of .*$ from your Caddyfile with no effect. In a multiline regex, this structure would match a line of any length, but only one line.
A really good reference and testing tool for regex can be found here: http://www.regexr.com/