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

2.8k Views Asked by At

I am trying to serve apple-app-site-association from the S3 via CloudFront distribution via my custom domain.

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

Do I need to make any setting at S3 or CloudFront level to make it work?

Note: The application is developed in Angular.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

As Christos says, you need to set the content-type response header in S3, which then also applies to Cloudfront HTTPS URLs.

Here is an example of mine, that I use for deep linking and OpenID Connect with an HTTPS redirect URI:

Further details on how this looks in my blog post, where you set the content type by editing tte file properties:

File Properties