将Firebase Web应用程序链接到Firebase托管站点有什么好处? [英] What benefit does linking Firebase web app to Firebase Hosting site brings?

查看:118
本文介绍了将Firebase Web应用程序链接到Firebase托管站点有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应将Web应用程序链接到控制台中的Firebase Hosting网站的目的是什么?有什么好处和效果?

What for should I link the web app to the Firebase Hosting site in the console? What are the benefits and effects?

此处介绍了两者之间的区别: firebase Web应用程序和firebase托管之间有什么区别.

The difference between the two is covered here: Whats the difference between firebase web app and firebase hosting.

在文档 https://firebase.google中提到了该链接. com/docs/web/setup#register-app ,但未解释其原理和后果.

The linking is mentioned in the documentation https://firebase.google.com/docs/web/setup#register-app, but the rationale and consequences are not explained.

推荐答案

Firebase 支持文档说:

The Firebase support documentation says:

如果您在Firebase项目中注册Web应用程序时选择不设置主机,则可能需要在项目"设置中将您的Web应用程序链接到您的主机站点.

You may need to link your web app to your Hosting site in the Project settings if you chose not to set up Hosting when you registered your web app with your Firebase project.

如果您将Firebase托管用于网络应用,则可以使用保留托管URL ,以添加Firebase SDK并管理您的应用的Firebase配置.

If you're using Firebase Hosting for your web app, you can use the reserved Hosting URLs to add Firebase SDKs and manage your Firebase configuration for your app.

简而言之,如果您使用的是那些以__开头的特殊托管URL,尤其是/__/firebase/init.json,则将您的应用程序链接到Hosting有助于完成配置.据我回忆,在这种情况下,该配置将具有正确的FCM配置.

In short, if you're using those special Hosting URLs that begin with __, in particular, /__/firebase/init.json, it helps to have linked your app to Hosting so that the configuration is complete. By my recollection, the config will then have a correct FCM config in this case.

这篇关于将Firebase Web应用程序链接到Firebase托管站点有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆