apple-app-site-association File Downloads Instead of Displaying JSON
Symptoms
- When opening the apple-app-site-association URL in the browser, the apple-app-site-association file gets downloaded instead of displaying the raw JSON content as expected.
Cause
This is due to a piece of optional code not appearing in the site.config.template file.
Solution
-
To resolve this issue the following piece of code needs to be added to the site.config.template for the specific environment and website.
location ~ ^/.well-known/apple-app-site-association$ { default_type application/json; }
More information
- This is an optional configuration to prevent the file from downloading