I want to set up a private staging server on heroku using simple http authentication. Is that possible?
A:
Absolutely. The simplest solution is to just put something in your application controller that uses Rails's built in basic auth support (see here: http://railscasts.com/episodes/82-http-basic-authentication) and just wrap it in a conditional for your Rails.env
. Note that on Heroku, by default the RAILS_ENV is set to production, but you can change this for your non-production apps using heroku config
(http://docs.heroku.com/config-vars).
You could also consider installing some roadblock-style Rack middleware, but I'd just go with the above.
tfe
2010-10-01 17:33:40