I’m developing a site that will run from Heroku and I’m about to the point where I would like to push a prototype to Heroku for testing purposes and to make sure that I have all of the proper settings in place for it to run there. I would like a quick and dirty method of putting the entire site behind a simple login/password so that it’s not open to the public during this period of light testing. It would be best if it is just a few lines of code and not deeply embedded in the app.
How would you go about quickly securing an entire Rails 3.2 app on Heroku?
http_basic_authenticate_withis a simple one liner if you add it to you application_controller.rbhttp://apidock.com/rails/ActionController/HttpAuthentication/Basic