I'm having a lot of trouble with serving a apple-app-site-association file in ReactJS project.
I've searched a lot of GitHub issues pages (for ReactJS, Gatsby, and Angular), forums, and a lot of online communities, and it seems that I can't find a solution for this.
What I've tried is:
- Adding the file into public/.well-known folder.
- Adding a separate route via react-router on path "/apple-app-site-association" and returning an tag with file
- Adding
<link rel="apple-app-site-association" href="%PUBLIC_URL%/.well-known/apple-app-site-association">
into public/index.html
Testing through the "aasa-validator" returns:
Your file's 'content-type' header was not found or was not recognized.
Keep in mind that:
- The apple-app-site-association JSON file must not have a .json file extension.
- It has to be on "/apple-app-site-association" or "./well-known/apple-app-site-association" links on the website.
- I can't use a redirect to another page/link.
Thanks in advance!
Ps. If it helps, I'm using a Heroku for deployment.