Port on Worker Route

Hey :wave:

I’m attempting to get a worker route to match on a url including a specific port.

eg: https://*example.com:3072/*

However adding the port in this way shows the error Route patterns must include your zone, this seems to be an issue with the implied path of / if there is no path specified.

Is there a way to implement the Route Match using a port and a wildcard for the path?

Thanks!

Hi Thomas,

You can always check the port inside the worker and pass through the request it doesn’t match. Only downside is that you will have to pay for the traffic on the other ports.

Hi Markus,

Thanks for this :slight_smile: , the problem here will be that the URL is accessed directly via the port.
Therefore the worker will not trigger on the route pattern https://*example.com/