Firebase Dynamic Links subdomain config

我怕爱的太早我们不能终老 提交于 2020-04-18 12:35:17

问题


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
        }
      ]
    }
  ]
}

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. 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...

回答1:


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

"ignore": [
    "*"
  ],

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.



来源:https://stackoverflow.com/questions/60703337/firebase-dynamic-links-subdomain-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!