Created
March 14, 2013 01:06
-
-
Save nowk/5157982 to your computer and use it in GitHub Desktop.
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
private | |
def force_ssl | |
if Rails.env.production? | |
if !request.ssl? | |
redirect_to :protocol => 'https' | |
end | |
end | |
end |
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
before_filter :force_ssl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment