Using wildcard to match hostnames

Since the above is a bit of an aside to the actual question itself (what’s the rationale for the current behaviour, and can Caddy achieve arbitrary wildcard subdomain depth):

In my experience, things are conceptually much neater/more functional when you enforce label depth; treating the hostname more like a string reduces functionality.

Also in my own experience, the use case for completely arbitrary subdomain depth is much smaller (so as to be nearly nonexistent) than the use case for specific subdomain depth.

Finally, and building on the first point somewhat, I would argue that it is better to enforce specific depth because while under the current behaviour it is possible to manually handle arbitrary subdomain depth (albeit with some complex configuration involved), if you swap things around, it would be extremely difficult (impossible?) to handle specific depths only unless there was some toggle to actually define Caddy’s behaviour here manually (which it strikes me might be a very complex thing to code and introduce a lot of potential issues/confusion, although I’d hesitate to speak with authority on that).

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.