It sounds like you’re using the Cloudflare Proxy, and as such, uses a Proxy Address for accessing your site. That’s expected behavior.
A 522 is not expected behavior.
A 522 error typically happens when Cloudflare requests to the origin (your webserver) get blocked. Review the suggestions in this Community Tip for troubleshooting ideas.