Created
April 25, 2013 22:47
-
-
Save iaintshine/4e03123b6ce56766b52f to your computer and use it in GitHub Desktop.
Basic authentication only in production environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExamplesController < ApplicationController | |
before_filter :authenticate_ip if Rails.env.production? | |
http_basic_authenticate_with :name => "login", :password => "pass" if Rails.env.production? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment