Configuring `Resolve Override` for `Page Rules` always resolves in 522
Hi, I tried to configure
Resolve Override
for Page Rules
to point to a Pages
project but it always resolves in 522 error screen. In my domain DNS, I have this configuration
and I configured a rule in Page Rules
as
I would expect that if I go to https://mycompany.com/foo
it should display the page from bar.pages.dev
Is there something wrong in my configuration?4 Replies
Pages is not compatible with Resolve Override. You will need to proxy via a Worker and in the future can use Cloudflare Snippets (https://blog.cloudflare.com/cloudflare-snippets-alpha/)
Thanks for the information. I've read the documentation https://developers.cloudflare.com/rules/origin-rules/features/#dns-record and it seems like it should work. May I know why
Pages
is excluded?Available Origin Rules settings · Cloudflare Rules docs
The following sections describe the available settings in Origin Rules.
It's something to do with the way Pages works internally and making use of Custom Hostnames.
I absolutely agree it should be called out in the documentation, and I created an internal ticket to track that addition last time I came across it. Will make sure to revisit it
thank you 🙂 I will stick to Worker solution for now then.