Search code examples
firebaseexpressgoogle-cloud-functionsmiddlewarefirebase-hosting

Payload size in Firebase reverse-proxy


Is there any payload size for apps hosted on Firebase or the only way to limit the payload is to use some kind of middleware?

Otherwise do we need to configure this on our own using Express? An example from Node.js best practices: https://github.com/i0natan/nodebestpractices/blob/security-best-practices-section/sections/security/requestpayloadsizelimit.md#example-code-for-express


Solution

  • As you can see in the documentation, Cloud Functions has a hard limit of 10 MB for HTTP request and response payloads. There's nothing you can do to increase this limit. I assume it's possible to impose your own smaller limit by checking the request or response, but once the response is received, you will have already paid the cost of the bandwidth and function invocation.