Skip to content

Instantly share code, notes, and snippets.

@is8r
Created May 30, 2013 06:36
Show Gist options
  • Save is8r/5676063 to your computer and use it in GitHub Desktop.
Save is8r/5676063 to your computer and use it in GitHub Desktop.
herokuにBasic認証をかける
#app/controllers/application_controller.rbに
http_basic_authenticate_with :name => ENV["BASIC_AUTH_NAME"], :password => ENV["BASIC_AUTH_PW"] if Rails.env.production?
$ heroku config:add BASIC_AUTH_NAME=xxxx
$ heroku config:add BASIC_AUTH_PW=xxxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment