[Beta Product] Cloudflare Pages Custom Domain Breaks some Features

Hello everyone,

I am currently trying to migrate my website to Cloudflare Pages, with custom domain set up. While the site is served with no problem at all, I realise some of the features of Cloudflare no longer work:

  1. Page rules: Page rules no longer match my domain, which points the Cloudflare Pages custom domain (CNAME foo.pages.dev)
  2. Always Use HTTPS: No longer redirects non-https request to https
  3. Workers: Workers no longer triggers when user visit the specific route
  4. wrangler CLI: wrangler dev failed with error Error: HTTP status client error (400 Bad Request), where the route key in wrangler.toml pointed to the Cloudflare Pages custom domain

The above issues affect the root domain/subdomain that is CNAME to foo.pages.dev, other subdomain are unaffected, all features works completely fine.

May I know if currently Cloudflare Pages is not yet fully integrated with those features, or it is a bug?

Any suggestions is welcome. Thank you for your help.

Hello,

these are known bugs that the Workers team is aware of. It was planned to be fixed relatively soon, but may have been slightly delayed due to the weather related issues at the Austin office.

I don’t understand this, you are trying to deploy a Worker to a path of a *.pages.dev domain?

Thanks for your reply.

I am glad that these bugs will be fixed soon

For point 4, what I mean is I am trying to deploy a Worker with route set to mydomain.com/*, which is one of the custom domains for my Cloudflare Pages project. When I run wrangler dev, wrangler gives me the error.

Here is a more detailed version of the error:

Error: HTTP status client error (400 Bad Request) for url (https://mydomain.com/cdn-cgi/workers/preview/?s0=AenUkehK2…)

When I try to visit the page (https://mydomain.com/cdn-cgi/workers/preview/?s0=AenUkehK2…),
a Cloudflare 1031 error page (Invalid Workers Preview configuration) is presented.

It still is a beta, after all…

I feel like this is connected to the first 3 points, since the worker can’t run on Pages domains at the moment, the Worker’s preview path fails as well.

Understand…

Thank you very much for your help.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.