Can an origin rule redirect based on incoming port?

Origin Rules allows you to override the destination port, but is it possible to create a rule that filters based on the incoming port? If so, how, as I can't find an option to do this.
The configuration I want to create is to have all traffic incoming on one URL, but if the traffic is on port 80 or 443 for HTTP(S) traffic then it should be directed to an R2 bucket, and if the traffic is sent on an arbitrary port (25565) then it should be directed to an IP address (a web server). What would be the best way to achieve this? I do not wish for the HTTP(S) traffic to be redirected to the web server and then back to R2, the redirection should happen using Cloudflare rules.
Any help would be greatly appreciated, thank you.
Was this page helpful?