android - How can you filter out direct calls to your API coming from mobile apps rather than web browsers when viewing/parsing IIS logs -


we have web api hosted on iis used service spa , used provide data iphone/android apps.

i want filter logs (maybe user agent) can see calls coming spa running within browsers (including browsers on mobile devices) , not direct calls apps (both spa , apps use same urls)

we forward of our iis logs splunk analysis , have searching , filtering capabilities. problem i'm not sure search/filter for.

this not quite straight forward might think.

essentially have identify mobile clients user-agent value. there many, many mobile user-agents (http://www.useragentstring.com/pages/mobile%20browserlist/), enumerating them not efficient.

using logparser (see , example here: http://blogs.msdn.com/b/jaskis/archive/2008/11/13/logparser-calculate-no-of-hits-for-different-browser-type-from-iis-logs.aspx) can create set of rules cover 80% of mobile traffic searching user agent string contains of following text:

android, webos, iphone, ipad, ipod, blackberry, iemobile, opera, mini

this list taken from: what best way detect mobile device in jquery?

personally, try mobile clients of api use different url, make easy identify, requires code change.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -