问题
I am going to use http-basic-authentication in a rails app. I watched this railscast to figure out how do do that:
http://railscasts.com/episodes/82-http-basic-authentication
In the video he says not to put the username and password directly in the code. Where should I put them then?
I am using rails 3.1.0.
回答1:
You want to move them into config files. Ceck out this RailsCast about "Application Configuration".
来源:https://stackoverflow.com/questions/12574519/where-should-i-put-username-password-for-http-basic-authentication-in-rails-app