1

I have some actions in my app that require a user to have logged in on the website, and some that require a "person" (a mobile app user basically) to have authenticated. In order to know whether i need to push the current request through the mobile authentication, i'd like to be able to tell whether the request came from a browser or from an iphone for example.

Is there a request header or something i can look at for this?

thanks, max

Max Williams
  • 32,435
  • 31
  • 130
  • 197

1 Answers1

1

take a look at mobile_fu

cbrulak
  • 15,436
  • 20
  • 61
  • 101
  • That's really interesting, thanks @cbrulak. However, the format of the requests from the mobile app in question is xml, so i don't want it switched to :mobile. I'll definitely remember that for the future though. I ended up doing this: `if request.env['HTTP_USER_AGENT'] =~ /MobileAppName|libcurl/`. (libcurl is just there so i can simulate the mobile app from curl) – Max Williams Jun 17 '11 at 09:00