ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersโ€ข3y agoโ€ข
8 replies
Kris

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.
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Port Origin Rule
Cloudflare DevelopersCDCloudflare Developers / general-help
6mo ago
Origin rule redirect to a specific location
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
Create request header to origin based on incoming request header
Cloudflare DevelopersCDCloudflare Developers / general-help
3y ago
Port forwarding not working for subdomain with origin rule
Cloudflare DevelopersCDCloudflare Developers / general-help
14mo ago