To anyone looking to put Cloudflare or another CDN in front of Firebase - bear in mind that Firebase sees only one IP making a massive number of requests and may decide to block that IP. I'm not sure if this is something happening recently, but here's the (arrogant) response from Google Support on the matter:
The specialist we involved in the issue recommended us to escalate
this with one of the Firebase Engineers which we did.
The engineers mentioned us that CloudFlare integration is limited as
Firebase hosting already provides content through the Firebase CDN[1]
and adding a second CDN on top is discouraged as it can actually bring
down the site performance.
This causing a limitation preventing us to allow the cloudflare IPs.
Edit: If you're interested in doing this, Google have opened a "Feature request" here to whitelist / stop blocking CDN IPs:
https://issuetracker.google.com/issues/185590945?pli=1
Please star it if you would like it resolved faster.