Skip to content

Instantly share code, notes, and snippets.

@nabinno
Created July 24, 2014 13:51
Show Gist options
  • Save nabinno/feb1bda8187942e628a1 to your computer and use it in GitHub Desktop.
Save nabinno/feb1bda8187942e628a1 to your computer and use it in GitHub Desktop.
本番環境のみ、BASIC認証を設定する! #Ruby #heroku #Rails / Qiita http://qiita.com/fakestarbaby/items/c5fe2a28983056fee68b
http_basic_authenticate_with :name => ENV["BASIC_AUTH_NAME"], :password => ENV["BASIC_AUTH_PW"] if Rails.env.production?
# After:
# $ heroku config:add BASIC_AUTH_NAME=fakestarbaby
# $ heroku config:add BASIC_AUTH_PW=password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment