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
foo.mycompany.com bar.pages.dev

and I configured a rule in Page Rules as
mycompany.com/foo*
Resolve Override: foo.mycompany.com


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?
Was this page helpful?