在Firebase托管上设置文件MIME类型 [英] Set file MIME type on Firebase Hosting

查看:104
本文介绍了在Firebase托管上设置文件MIME类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在iOS 9+上实现通用链接,并试图将apple-app-site-association文件添加到我的Firebase托管根目录:

I'm implementing Universal Links on iOS 9+ and am trying to add the apple-app-site-association file to my Firebase Hosting root:

https://developer.apple.com/library/ios /documentation/Security/Reference/SharedWebCredentialsRef/

如果您的应用程序在iOS 9和更高版本中运行,并且您使用HTTPS来提供文件,则可以创建使用application/json MIME类型的纯文本文件,而无需对其进行签名.

If your app runs in iOS 9 and later and you use HTTPS to serve the file, you can create a plain text file that uses the application/json MIME type and you don’t need to sign it.

如何将MIME类型设置为"application/json"?看来文档没有将此列为可能的内容类型.

How can I set the MIME type to "application/json"? It looks like the documentation does not list this as a possible content type.

推荐答案

Google Firebase托管已更新为包含此内容类型.只需将声明添加到您的应用程序配置firebase.json中即可.

Google Firebase Hosting has been updated to include this content type. Just add the declaration to your app config firebase.json.

这篇关于在Firebase托管上设置文件MIME类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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