Is it possible to differentiate what CF plan zone is using from CF Worker?

@harris The request.cf object has some Business and Enterprise only supported features https://developers.cloudflare.com/workers/reference/apis/request/.

So curious if it’s possible within a CF worker to detect what type of CF plan the zone is on i.e. free, pro, biz, enterprise ?

2 Likes

Hi @eva2000, there’s no explicit way to detect what zone a worker is running on through the JS API, no. Presumably one could devise a hacky way to do so with the properties of the request.cf object, or perhaps even the presence of certain request headers. However, such properties/headers could be enabled for other plans at some point, so it wouldn’t necessarily be reliable.

2 Likes

Thanks @harris for the clarification

cheers