Route to different origins based on User-Agent/Device

Hi,

Is it possible to pull content from different origin servers based on user-agent/device.

We run our mobile site through a 3rd party and we would like the ability to set the origin server the site is pulled on to be based on user-agent/device type but the user will be hitting the same URL for both and we don’t want the user to be redirected just the origin being pulled to change?

Regards
Dave

With a worker that should be relatively easy to implement.