CloudFlare has just revealed a brand new feature that is undergoing beta testing right now.
This new feature would let the user set a mobile version of the website in the CloudFlare backend.
CloudFlare would handle the redirection based on the device used by the visitor.
This means that you would no longer have to care about detecting user agent yourself to redirect the user to the mobile edition of your website. CloudFlare would take over that responsibility.
The company said that this feature would only be available to paying subscribers who created an account directly with them instead of through a hosting partner.