Serving ./well-known/apple-app-site-association file from pages

I'm using next js's static file export feature and uploading my website to pages (so not using functions). I added apple's universal linking verification file today at next js's public/.well-known/apple-app-site-association path. And it does get picked up when I visit the site, however instead of showing contents it gets downloaded.

Apple requires devs to serve this file as json. I added _headers file to public/_headers location with following contents

/.well-known/apple-app-site-association
  Content-Type: application/json


And deployed, however it seems to have no effect and file still gets downloaded. Would appreciate any advice on how to resolve this without using functions if possible.
Was this page helpful?