简体   繁体   English

Apple 在 S3 上的 apple-app-site-association 文件与 CloudFront 分布

[英]Apple's apple-app-site-association file on S3 with CloudFront Distribution

I am trying to serve apple-app-site-association from the S3 via CloudFront distribution via my custom domain.我正在尝试通过我的自定义域通过 CloudFront 分发从 S3 提供 apple-app-site-association。

But when I am given a path like below, It's started downloading rather than showing in the browser.但是当我得到如下路径时,它开始下载而不是显示在浏览器中。

https:/mycustomdonain.com/.well-known/apple-app-site-association https:/mycustomdonain.com/.well-known/apple-app-site-association

Do I need to make any setting at S3 or CloudFront level to make it work?我是否需要在 S3 或 CloudFront 级别进行任何设置才能使其正常工作?

Note: The application is developed in Angular.注:该应用程序在 Angular 中开发。

Thanks谢谢

As Christos says, you need to set the content-type response header in S3, which then also applies to Cloudfront HTTPS URLs.正如 Christos 所说,您需要在 S3 中设置内容类型响应 header,这也适用于 Cloudfront HTTPS URL。

Here is an example of mine, that I use for deep linking and OpenID Connect with an HTTPS redirect URI:这是我的一个示例,我使用 HTTPS 重定向 URI 进行深度链接和 OpenID Connect:

Further details on how this looks in my blog post , where you set the content type by editing tte file properties:在我的博客文章中查看更多详细信息,您可以在其中通过编辑 tte 文件属性来设置内容类型:

文件属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM