How can I share the Under Attack challenge result between subdomains?

I have api and cdn subdomains configured in my Cloudflare account. When I activate the Under Attack mode, I need to open all my subdomains to run the challenge and make my subdomains working again.