I have this apple-app-site-association file under the .well-known directory. When I open the URL in browser JSON file shows up correctly but if I am validating using any of the validators I am getting following error.
Asked
Active
Viewed 962 times
2 Answers
2
Working receipt
<FilesMatch "apple-app-site-association">
ForceType application/json
</FilesMatch>

dpolyakov
- 260
- 1
- 3
- 11
-
2this is definitely the shortest answer I have found and google should pick it up as "make apache return apple-app-site-association as json" – Arno Teigseth May 22 '23 at 05:16
1
You can use the rewrite valve to set the content-type. Add the valve to your context.xml in META-INF:
<Context>
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
</Context>
now place the apple-app-site-association file with the .json extension in the .well-known folder. Create a file named rewrite.config in WEB-INF with the following content:
RewriteCond %{REQUEST_URI} /.well-known/apple-app-site-association
RewriteRule .* /.well-known/apple-app-site-association.json
now it you access https://host/.well-known/apple-app-site-association the json file will be delivered with content type set to application/json, this is the default mime mapping.

rob2000
- 180
- 1
- 10