How to discover the *external* hostname from within a heroku cedar application
I am deploying a RubyOnRails 3.1 app to heroku cedar stack. From within the app I would like to auto discover the host name (i.e. appname.herokuapp.co开发者_StackOverflow中文版m
). I have multiple deployments of the same app on heroku - some for development, some for staging and some for production. It would be nice to be able to check an environment variable or make some call to find out my app host name from within the app.
does
request.host
give you want you want?
精彩评论