Closed stephenmorrell closed 3 years ago
Adding Access-Control-Allow-Credentials
to true
in the response fixed this issue for both Yahoo and Aol Mail. I don't see this mentioned in the documentation so it might be worth adding to save someone else the trouble.
My
amp-list
andamp-form
requests from Yahoo Mail are failing and I believe the issue is related to theOrigin
HTTP header on the request being null. The status of the calls in my browser's network tab read "Cross-Origin Resource Sharing error: InvalidAllowCredentials".According to AMP's documentation on CORS, the value of the
Origin
header must be included in theAccess-Control-Allow-Origin
HTTP response header. I'm assuming the call is designed to fail when that response header's value is null. Both versions of the mechanism are being supported server-side per the documentation. I believe Yahoo Mail is using version 1 because they are not setting anAMP-Email-Sender
header during the request. Additionally, they are setting anOrigin
header and a__amp_source_origin
query string on the URL. TheOrigin
header is null but the__amp_source_origin
query string value ishttps%3A%2F%2Fmail.yahoo.com
.It's worth noting this same AMP email works without issue in Gmail, including the
amp-list
andamp-form
calls.Any advice on this topic would be greatly appreciated.