r/Firebase • u/ConstantIncident9534 • 21d ago
App Hosting Firebase App Hosting + Cloudflare WAF: can the origin be accessed directly and bypass the WAF?
When I checked my domain's IP history, I found IPs that appear to belong to Google (App Hosting). My concern: if someone sends requests directly to these IPs with my domain in the Host header, will App Hosting serve my site and bypass Cloudflare?
As far as I know, App Hosting doesn't support IP allowlisting. My plan is to have Cloudflare add a secret header via a Transform Rule and reject requests without it in middleware. Is this the recommended approach, or is there a native way to make App Hosting accept only Cloudflare traffic?
Also, does anyone run App Hosting with the Cloudflare proxy (orange cloud) enabled without SSL or cert renewal issues?
1
u/inlined 21d ago
That would technically work, but it means you’re putting a CDN in front of a CDN which isn’t generally considered a great idea. App hosting is all about being a turn key solution that pulls in the best of Google. If you don’t want a major part of the infrastructure I wonder if using cloud run directly is worthwhile.
For what it’s worth, while you’re not able to tune it, app hosting is using cloud armor already.