将 Cloud Functions 与 Firebase 托管配对有哪些优势?

What are the advantages of pairing Cloud Functions with Firebase Hosting?

Firebase 文档中有一个页面介绍如何 pair functions with hosting。在我的用例中,我的所有函数都生成动态内容,因此我不会在 CDN 上使用缓存。我想知道是否还有其他原因建议将功能与托管配对?

这样做的最常见原因是为您的函数端点获取自定义 host/domain 名称。许多人不关心您免费获得的生成名称。

参见:Use custom domain for Google Cloud Function