puma / puma-dev

A tool to manage rack apps in development with puma
BSD 3-Clause "New" or "Revised" License
1.74k stars 107 forks source link

Add support for multipart TLDs #283

Closed yoerayo closed 3 years ago

yoerayo commented 3 years ago

The current implementation of puma-dev doesn't actually take the configured domains into account when resolving apps, so anything other than a very simple TLD fails to resolve properly. This PR attempts to remove the configured TLDs from the requested host before falling back to the old method of just stripping everything after and including the last period from the host.

nonrational commented 3 years ago

Thanks @yoerayo! Looks like this enhancement will obviate the symlink workarounds necessary to configure domains and not just TLDs. I'm going to merge as is and then add a note to the readme.

Will cut a new release in the next few days after kicking the tires a bit.