Я пытаюсь показать баннер Амазонки на моем сайте. Вот код по умолчанию для баннера:
<script type="text/javascript" language="javascript"> var aax_size='160x600'; var aax_pubname = 'username'; var aax_src='302'; </script> <script type="text/javascript" language="javascript" src="http://c.amazon-adsystem.com/aax2/assoc.js"></script>
Это ошибка, которую я получаю, если я не изменяю ссылку http:
first:1 Mixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure script 'http://c.amazon-adsystem.com/aax2/assoc.js'. This request has been blocked; the content must be served over HTTPS.
Теперь, если я изменю URL sr c как https://c.amazon-adsystem.com/aax2/assoc.js. Баннер amazon загружается, но замок ломается со следующим сообщением в консоли:
https://c.amazon-adsystem.com/aax2/assoc.js
Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure frame 'http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com'. This request has been blocked; the content must be served over HTTPS.
Указанный выше URL http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com находится в javascript, размещенном на amazon, который я не могу изменить. Есть ли способ это исправить?
http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com
just clear your browser cache or try it in private/incognito window with your HTTPS changes. It can be a browser level issue. As amazon is using Protocol Relative URL in this script. So there is no where hard coded http or https. You can view the same by beautifing the code in http://c.amazon-adsystem.com/aax2/assoc.js
Большинство служб, которые поддерживают https, но предоставляют http, принимают https://our.site.com в качестве альтернативы http://our.site.com. Вы пытались просто изменить протокол с
"http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com"
на
"https://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com"