简体   繁体   English

将子域连接到 Firebase

[英]Connecting subdomain to firebase

I am trying to use dynamic links for firebase using my custom domain link.我正在尝试使用我的自定义域链接为 firebase 使用动态链接。 For the above purpose, I added the custom domain on firebase web hosting, and followed all the steps, but status is still showing as "Needs setup" .出于上述目的,我在 firebase 虚拟主机上添加了自定义域,并遵循了所有步骤,但状态仍显示为“需要设置”

My main domain pointing to some other host, the sub domains pointing to some aws elastic ips, and now the newly created sub domain to firebase ips.我的主域指向其他主机,子域指向一些 aws 弹性 ips,现在新创建的子域指向 firebase ips。 The dns provider that i am using is cloudflare.我使用的 dns 提供商是 cloudflare。

www.maindomain.com => webflow host www.maindomain.com => webflow 主机

subdomain1.maindomain.com => aws elastic ip 1 subdomain1.maindomain.com => aws 弹性 ip 1

subdomain2.maindomain.com => aws elastic ip 2 subdomain2.maindomain.com => aws 弹性 ip 2

firebasesubdomain.maindomain.com => firebase ip records (A Records). firebasesubdomain.maindomain.com => firebase ip 记录(A 记录)。

I cannot delete all the A records just to point to firebase, since the aws elastic ip's are my live servers serving my customers.我不能删除所有 A 记录只是为了指向 firebase,因为 aws 弹性 ip 是我的实时服务器,为我的客户提供服务。 So my question is keeping all of the above records intact is there a way to point my subdomain to firebase and transfer only the subdomain's ownership to firebase, where then i can easily create dynamic links for that domain as well?所以我的问题是保持上述所有记录完整,有没有办法将我的子域指向 firebase 并仅将子域的所有权转移到 firebase,然后我也可以轻松地为该域创建动态链接?

When connecting a domain to Firebase Hosting, you must ensure your A records are pointing directly to the Firebase IP addresses.将域连接到 Firebase 托管时,您必须确保您的 A 记录直接指向 Firebase IP 地址。 You can check this using eg:您可以使用例如:

dig firebasesubdomain.maindomain.com

If the Cloudflare proxy is turned on, Cloudflare will set the A records to their own IP addresses and Firebase Hosting will not be able to recognize the IPs.如果 Cloudflare 代理打开,Cloudflare 会将 A 记录设置为它们自己的 IP 地址,Firebase 托管将无法识别这些 IP。 You should turn off the Cloudflare proxy, as Firebase Hosting is already serving content over a CDN and proxying will only introduce additional latency.您应该关闭 Cloudflare 代理,因为 Firebase 托管已经通过 CDN 提供内容,而代理只会引入额外的延迟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM