conditional routing to a different endpoint

Is it possible to set conditional request routing(based on user-agent) to a different endpoint(outside cloudflare) and setting up a custom request header in the request? I see worker is an option but it will cost a lot. is there any other way?
Was this page helpful?