Combine Cloudflare for SAAS with Cloudflare Pages

I am in the exact same situation.

I would like to use SSL for SaaS to create custom hostnames to my app hosted on Cloudflare Pages, I don’t want to use the built in custom domain solution of Cloudflare Pages, because I don’t want to expose the pages.dev domain, I’d like to use my own domain for that.

I could successfully configure SSL for SaaS for other systems, but when I try to configure it to a domain configured as a custom domain of Cloudflare Pages I always receive a 522 page.

I also tried to configure my pages.dev url as the fallback domain of SSL for SaaS, but It results in an error…