Skip to content

Instantly share code, notes, and snippets.

@tammersaleh
Created December 15, 2008 17:09
Show Gist options
  • Save tammersaleh/36012 to your computer and use it in GitHub Desktop.
Save tammersaleh/36012 to your computer and use it in GitHub Desktop.
def ensure_ssl_connection
if ENFORCE_SSL and not request.ssl?
Rails.logger.info(request.headers.to_yaml)
flash.keep
redirect_to params.merge(:protocol => "https://")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment