Closed jacksonrayhamilton closed 6 years ago
This is out-of-sync with master.
I guess it's an acceptable solution. Prax doesn't care about the actual TLD anyway; it already accepts .test
, .localhost
or .whatever.you.want
as long as they resolve to a local IP, so that just changes the default configured TLD.
I'll keep using .dev
myself and damn Google.
Synchronized with master
.
I suppose we can change the TLD by setting PRAX_DOMAINS
? Maybe that should be documented, I see it in the code but not mentioned anywhere.
Nope, the way we resolve hosts doesn't involve PRAX_DOMAINS
anymore. Given myapp.some.where.localhost
, for example, Prax will search, in order, for:
myapp.some.where.localhost
myapp.some.where
myapp.some
myapp
The TLD isn't of any importance; as long as a domain resolves to localhost, Prax will gladly accept it.
I didn't verify my claim, maybe it's skips the right-most TLD by default and thus searches for myapp.some.where
initially. What's important is that the right-most TLDs can be whatever.
What's the best way to make the domains resolve to localhost? Update /etc/dnsmasq.d/prax
manually and change "test" to one's TLD of choice?
Yes, for example. I copy-pasted test
and localhost
files myself, and left prax
as is.
I added documentation explaining how to use Prax with other TLDs.
Is this good to merge?
Yup, thank you!
Fixes https://github.com/ysbaddaden/prax.cr/issues/61. Pow decided to use ".test" so I figured we would do the same.
Of course, this will be a breaking change, but a welcome one.