![]() ![]() ![]() This made even less sense when looking closely at the network request – my response header exactly matched the _amp_source_origin request parameter! However, even though I could see that my JSON fetch now returned the right headers, such as “amp-access-control-allow-source-origin”, I was still getting a very specific error: “The amp-access-control-allow-source-origin must be equal to the amp source origin sent in the request.” I followed the recommendations given by Google from the first link, and updated the email template with the new source. I quickly uploaded the JSON source for my list to a special subfolder on my server, and added an HTACCESS file for that directory so I could play around with adding the correct headers. Here is a more complete list of security headers that your server should send back in response to AMP resource requests. ![]() Here are the recommended headers for use with the AMP Email Playground.Opening up the browser dev tools, it was pretty easy to spot that this had to with security issues – the JSON src of the list was fetched just fine (200 status), but the Playground was refusing to parse and show it due to a bunch of missing CORs header.Ī quick search got me what I was was looking for – the AMP for Email specification does indeed require special security related headers for remote JSON sources that are fetched for elements: More specifically, it was not showing up in the “Gmail AMP for Email Playground” tool – where the slide carousel should have appeared, there was just empty blank space. I recently ran into the issue of an carousel not working inside an AMP email template. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |