CNAME lookup with ruby

Hi,

I want to be able to use ruby to look up a particular CNAME domain and
see where it is pointing to, is there a way to do this with the ruby DNS
lookup libraries?

To clarify I have an application where each user has a subdomain like
user.example.com and I want the user to be able to set up a CNAME record
to this subdomain.

Then I want to use some middleware to be able detect that the
application is being accessed from a custom domain, then lookup where
the custom domain is pointed to, e.g. user.example.com, and then change
the request to this address so the whole thing is hidden from my app.

Any help or suggestions are very welcome!

On Sep 9, 2009, at 11:23, Oliver Nightingale wrote:

I want to be able to use ruby to look up a particular CNAME domain and
see where it is pointing to, is there a way to do this with the ruby
DNS
lookup libraries?

look at Resolv, it allows you to perform arbitrary DNS lookups.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs