-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
Problem
For hostname, you can specify
*.as a prefix to match domain and subdomains. For example,*.caddyserver.comwill matchcaddyserver.com,subdomain.caddyserver.com, but notfakecaddyserver.com.
Active word: prefix.
This implementation is constraining how well I can address a real-world example: New Relic says that their agent traffic is ingested via collector*.newrelic.com. If I try to specify that pattern, I get this from Caddy:
2023-05-04T18:10:04.94+0000 [APP/PROC/WEB/0] ERR run: loading initial config: loading new config: loading http app module: provision http: server srv0: setting up route handlers: route 0: loading handler modules: position 0: loading module 'subroute': provision http.handlers.subroute: setting up subroutes: route 0: loading handler modules: position 0: loading module 'forward_proxy': provision http.handlers.forward_proxy: *-[api.newrelic.com](http://api.newrelic.com/) could not be parsed as either IP, IP network, or domain: character * is not allowed
Since I can't specify collector*.newrelic.com for an acl directive I instead have to allow traffic to all of *.newrelic.com which is very overbroad for what I want!
Proposed solution
acl patterns like collector*.newrelic.com and *-api.newrelic.com should be supported.