我正在iOS 9+上实现通用链接,并试图将apple-app站点关联文件添加到我的Firebase托管根目录中:
https://developer.apple.com/library/ios/documentation/Security/Reference/SharedWebCredentialsRef/
如果您的应用程序在iOS 9及更高版本中运行,并且使用HTTPS为该文件提供服务,则可以创建一个使用应用程序/json类型的纯文本文件,并且不需要对其签名。
如何将MIME类型设置为"application/json"?文档似乎没有将其作为可能的内容类型列出。
发布于 2016-08-25 21:49:25
Google Firebase主机已被更新以包含此内容类型。只需将声明添加到应用程序配置firebase.json中即可。
发布于 2019-06-16 17:32:04
像这样更新您的防火墙主机配置文件"firebase.json“;您还可以提供内容类型、响应代码。
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
},
"hosting": {
"public": "dist/my_app",
"ignore": [
"firebase.json",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
},
{
"source": "/.well-known/assetlinks.json",
"destination": "/.well-known/assetlinks.json",
"content-type": "application/json",
"code":200
}
]
}
}https://stackoverflow.com/questions/38619572
复制相似问题