Cloudflare worker and overrideResolve

I have pointed to a cname in my zone, but it doesn’t seem to be working correctly (snippet below)

============

    var request = new Request(event.request, { cf: { resolveOverride: "us.mydomain.com" } });
    url.hostname = "www.mydomain.com";
    return event.respondWith( await fetch(url, request) );

============

us.mydomain.com is a CNAME to shops.shopify.com

I have read the limitations (https://developers.cloudflare.com/workers/runtime-apis/request#requestinitcfproperties
).

I am wondering if the issue is orange-to-orange? I can get this to work without changing the subdomain by querying us.mydomain.com.

Is overrideResolve limited to enterprise plans only?

Dave

First, is there a specific reason you are doing this harder route? I presume you are proxying a path and not the full hostname or doing something with language/country redirections, right?

Regarding the resolveOverride option it seems to be configured correctly, so I can imagine it being an issue of the orange-to-orange problem. Does the us subdomain even show as :orange: in the DNS records?

Country specific redirections, attempting to unify for SEO purposes without doing headless (yet).

The us subdomain is showing as “DNS only” CNAME, though I know the domain its pointing to shops.myshopify.com is served through CF.

Yeah, it won’t work with DNS only I would imagine… unfortunately there isn’t much of an alternative :frowning: I’ll try and remember and ask a support engineer if they have ideas.

Just to clarify the worker route is pointing to www.mydomain.com which is orange and proxied through.
So we are hitting the worker and getting the proxy, we are just not getting the resolveOverride functioning.

Yeah yeah, but I have doubts resokveOverride works for non :orange: records, or for orange-to-orange ones.

1 Like