Rack middleware for mobile device detection