【问题标题】:Refused to display 'https://cse.google.com/cse?cx=...' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'拒绝在框架中显示“https://cse.google.com/cse?cx=...”,因为它将“X-Frame-Options”设置为“SAMEORIGIN”
【发布时间】:2015-09-21 13:36:53
【问题描述】:
  1. 我有一个带有 iframe 的 Google 自定义搜索结果页面来显示结果。
  2. 我决定创建一个新的配置文件,并在相同的上下文中使用这个新配置文件。
  3. 因此,我创建了个人资料并在我的网站上所做的一切 - 只需更改搜索 ID。
  4. 结果我得到了

    "Refused to display 'https://cse.google.com/cse?cx=...' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."
    
  5. 然后我将我的 ID 改回旧 ID,它开始正常工作。

【问题讨论】:

    标签: google-custom-search


    【解决方案1】:

    谷歌stop to support iframes for the custom search result。因此,您的旧 ID 支持 iframe,作为旧版支持,但新创建的配置文件不支持。

    【讨论】:

      猜你喜欢
      • 2018-02-22
      • 2020-11-07
      • 1970-01-01
      • 2013-12-28
      • 2017-05-22
      • 2022-11-29
      • 1970-01-01
      相关资源
      最近更新 更多