Unable to add Firebase Dynamic Links to a project using a custom domain

后端 未结 6 2143
栀梦
栀梦 2021-02-05 01:30

I\'ve created Firebase Dynamic Links in other projects before using the page.link URL prefix (the only option at the time). However that no longer appears to be an option when e

6条回答
  •  心在旅途
    2021-02-05 02:14

    For us the issue was that we we're using the default Firebase Hosting site for serving our web-app at all routes ("/**"). Serving our web-app from a different domain that dynamic links is the way it should be for us, since links should not interfere with the web-app.

    To serve links from a different domain than our web-app, I created a new site just for links and attached our custom domain to that site. Now we have two Firebase Hosting sites. The first default one for our web-app and the second one for Firebase Dynamic Links.

    After this setting up Dynamic Links with a custom domain attached to the second Firebase Hosting site worked flawlessly. See the screenshot for more details:

    EDIT1: the web-app's firebase.json as requested by @cocacrave:

    {
      "hosting": {
        "public": "public",
        "ignore": [
          "firebase.json",
          "**/.*",
          "**/node_modules/**"
        ],
        "rewrites": [
          {
            "source": "**",
            "function": "nuxtApp"
          }
        ]
      }
    }
    

提交回复
热议问题