views:

22

answers:

1

Hi,

I'm trying to embed an Amazon "Recommended Product" widget into a website. We use SSL across all pages on the site.

Unfortunately, the Amazon widget by default is embedded using a simple IFrame and although the source for the IFrame can be https://, the images and links within the IFrame are always http://

IFrame sample code

<iframe src="https://rcm-uk.amazon.co.uk/e/cm?t=june2k&amp;o=2&amp;p=16&amp;l=st1&amp;mode=books-uk&amp;search=potter&amp;f=ifr&amp;f=ifr"
        width="468"
        height="336"
        border="0"
        frameborder="0"
        style="border:none"
        marginwidth="0"
        marginheight="0"
        scrolling="no"></iframe>

Needless to say this results in "insecure content" warnings, broken padlocks, etc.

So far the only solution I've been able to come up with is to get the contents of the IFrame using the server, parse it and re-write all the image links to be a local handler which in turn proxies the images - Which seems like a fragile solution with a lot of processing overhead (and very nasty).

Does anyone have any experience with this? Is there a method here that I'm missing? Can I get Amazon to return valid https:// urls?

If I change the image urls from http to https in-situ, I get a certificate mis-match error - it seems the images are server from the Akamai CDN and the common name for the certificate isn't the hostname used to serve the images.

I'm finding it hard to believe that an e-commerce company as large as Amazon is incapable of serving a secure page.

Any help greatly appreciated.

A: 

After a lot of digging, I found a version of the widget on the Amazon site which ram in SSL mode without errors.

After looking at the IFrame src, the URL has an additional parameter internal=1. I haven't seen this documented anywhere but it seems to tell the widget to server the images from Amazon's network instead of Akamai's - and SSL is supported.

The url should look like this:

https://rcm-uk.amazon.co.uk/e/cm?t=june2k&amp;o=2&amp;p=16&amp;l=st1&amp;mode=books-uk&amp;search=potter&amp;f=ifr&amp;f=ifr&amp;internal=1
Basiclife