[英]Firebase Dynamic Links subdomain config
假設我有一個域example.com
。 我通過托管和 cli 創建了第二個網站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
創建動態鏈接時,它給了我一個sub.example.com
信號:
It looks like you already have content served on this path. Specify a different path prefix to avoid conflicts with existing content.
public
字段嗎? 我不想在上面顯示任何內容,只是鏈接...我通過添加(或者更確切地說忽略)動態鏈接子域的公共文件夾來修復它。
"ignore": [
"*"
],
我看到了這篇文章: https : //github.com/firebase/firebase-tools/issues/566 ,有人問了類似的功能問題,答案是刪除dist/index.html
。 但是由於我的實際站點依賴於它,我嘗試忽略它並且它似乎有效。
我用@cocacrave 的回答解決了同樣的問題。 只需共享完整的firebase.json
文件。 * 應該有一個公共文件夾和設置,但我的公共文件夾是空的。
{
"hosting": {
"public": "public",
"ignore": [
"*"
],
"appAssociation": "AUTO",
"rewrites": [
{
"source": "/**",
"dynamicLinks": true
}
]
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.