【问题标题】:Is there a way to get https version of amazon banner?有没有办法获得 https 版本的亚马逊横幅?
【发布时间】:2020-07-15 05:52:36
【问题描述】:

我正在尝试在我的网站上显示亚马逊横幅。这是横幅的默认代码:

<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 src 更改为 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&amp;rP=https%3A%2F%2Fexample.com 位于亚马逊托管的 javascript 中,我无法更改。有办法解决吗?

【问题讨论】:

  • 您找到解决方案了吗?

标签: ssl https amazon affiliate


【解决方案1】:

大多数支持 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"

【讨论】:

  • 我做到了。他们正在 html 中导入图像,该图像在内部发出 http 请求,发布者无法更改。
  • 您能否更新发布代码 sn-p 的问题,在您的网站上包含亚马逊横幅?
【解决方案2】:
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

【讨论】:

【解决方案3】:

通过将 http:// 更改为 https:// 它对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-20
    • 2011-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-03
    相关资源
    最近更新 更多