Rails HTTP Basic Auth with Cookies on Heroku
Heroku uses config vars to keep sensitive data out of your code. Here’s a little setup I just made to get simple HTTP authentication into an app, with persistence across page views using the session. If you’ve set a heroku config var for the admin password, it will be used. Otherwise the default password is ‘secret’.