Created
August 13, 2016 02:03
-
-
Save muratatak77/c18ad4eae3b5768aac3cae3ef614761f to your computer and use it in GitHub Desktop.
before_action do |controller| HTTP_USER_AGENT
This file contains 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
## If specific android | |
# before_action do |controller| | |
# agent = request.env['HTTP_USER_AGENT'] | |
# puts "agent :::: #{agent}" | |
# if request.env['HTTP_USER_AGENT'].downcase.match(/iphone/) | |
# puts "iphone geldi. JWT check ..." | |
# jwt_validation | |
# elsif request.env['HTTP_USER_AGENT'].downcase.match(/android/) | |
# puts "Android geldi. Serbest gecis ....." | |
# else | |
# if (params[:action] == "index" || params[:action] == "os_type" || params[:action] == "show") | |
# jwt_validation | |
# end | |
# end | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment