Firebase动态链接子域配置 [英] Firebase Dynamic Links subdomain config

查看:106
本文介绍了Firebase动态链接子域配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个域example.com.然后,我通过托管和cli创建了另一个网站,名为sub.example.com.

Let's say I have a domain example.com. And I created a second website through hosting and cli as sub.example.com.

{
  "hosting": [
    {
      "target": "app",
      "public": "public",
      "rewrites": [
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    },
    {
      "target": "promos",
      "public": "public",
      "appAssociation": "AUTO",
      "rewrites": [
        {
          "source": "**",
          "dynamicLinks": true
        }
      ]
    }
  ]
}

现在,当我去为sub.example.com创建动态链接而没有任何路径前缀时,它给我一个红旗,说:

Now when I go to create Dynamic Link for sub.example.com without any path prefix, it gives me a red flag saying:

It looks like you already have content served on this path. Specify a different path prefix to avoid conflicts with existing content.

  1. 我在做什么错了?
  2. 此外,如果此子域仅用于链接,我还必须放置public字段吗?我不想显示任何内容,只是链接...
  1. What am I doing wrong?
  2. Also, if this subdomain is only for links, I still have to put public field? I don't want to show anything on it, just links...

推荐答案

我通过添加(或忽略)动态链接子域的公用文件夹来解决此问题.

I fixed it by adding (or rather ignoring) the public folder for the dynamic links subdomain.

"ignore": [
    "*"
  ],

我看到了这篇文章: https://github.com/firebase/firebase- tools/issues/566 ,有人问类似的功能问题,答案是删除dist/index.html.但是由于我的实际站点依赖于此,所以我尝试不理会它,并且似乎可以正常工作.

I saw this post: https://github.com/firebase/firebase-tools/issues/566 and someone asked similar question for functions and the answer was to delete dist/index.html. But since my actual site depends on it, I tried just ignoring it and it seems to work.

这篇关于Firebase动态链接子域配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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