Where should I put username/password for http basic authentication in rails app

夙愿已清 提交于 2019-12-11 09:14:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!