'content-type' header issue when validating ApplePay Well Known Association file in Pages instance
Hi there, I've been directed here from CloudFlare Support.
I have an Apple Well Known verification file saved in my Pages application:
https://checkouttemp-dev.shopthru.dev/.well-known/apple-developer-merchantid-domain-association
For the Pages project
shopthru-checkout-dev.pages.dev
which has the latest Production deployment of https://454ea75a.shopthru-checkout-dev.pages.dev.
Account ID: c18d716869a1d1fb1b4d36b576f6929c
The file can be loaded via a browser and a curl -I https://checkouttemp-dev.shopthru.dev/.well-known/apple-developer-merchantid-domain-association
responds as expected (well, I think).
However when I use this tool to validate the file (enter checkouttemp-dev.shopthru.dev as the Domain):
https://branch.io/resources/aasa-validator/
It shows a validation error of:
"Your file's 'content-type' header was not found or was not recognized."
I have been trying things like setting the correct headers in a _headers file for this project:
But to no avail. I believe there's something intrinsic about Pages going on here?
- This issue is present whether or not I use the default domain (shopthru-checkout-dev.pages.dev) or the custom domain (checkouttemp-dev.shopthru.dev).
- This validation error is occurring with known good files Association files as well.
- This validation passes when run against the same field served from Google Cloud in a side experiment.
Are there any known issues with Pages and Apple Well Known files around headers etc?
Thanks5 Replies
I'm not too proficient with what the
Content-Type
is supposed to be for Apple's verification system, but I don't think text/plain
is itAccording to the docs it is yeh.
If I run this working example through the online validator tool (link above):
host.checkout.shopthruapp.com
It passes validation.
A
curl -I
of:
Returns:
This example has DNS running through Google Compute and Google Cloud Storage bucket, not CloudFlare pages.Maybe it's the
charset
breaking it?Removing that, so headers are:
Makes no difference.
I feel it's something fundamental to Pages or something staggeringly obvious.
It seems like this was a red herring at least in terms of our implementation requirement. I'm still not sure why that validation issue is happening but am going to suggest that this issue may to some extent be crossing over in to areasof the third party vendor (i.e. the https://branch.io/resources/aasa-validator/ application).
Therefore am closing.
AASA Validator | Branch
Branch’s Universal Links Validator analyzes your site to check if your apple-app-site-association is properly hosted for Universal Links.