greatghoul
V2EX  ›  Google

Google Tasks 不再允许别家网站iframe嵌入

  •  
  •   greatghoul · Jan 18, 2013 · 4282 views
    This topic created in 4872 days ago, the information mentioned may be changed or developed.
    最近写了 Google Tasks for Pomotodo http://www.g2w.me/2013/01/google-tasks-for-pomootodo-0-3/ 的油猴脚本,来将 Google Tasks 嵌入到蕃茄土豆中使用,不过今天早上打开蕃茄土豆发现 iframe 加载失败。

    Refused to display document because display forbidden by X-Frame-Options.

    通过 Chrome Developer Tools 查看 Google Tasks 的 HTTP Response Header 发现如下配置



    关于 X-Frame-Options 的设置,查看 https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options

    显然 Google 官方已经阻止了非自家网站对 https://mail.google.com/tasks/ig 的嵌入,这个更改应该是昨天晚上发生的, Google 貌似近来变得自私起来,开始大力度的排外,虽然后来又有了些改观。

    这次针对 Google Tasks 的调整,不知道是基于什么原因,不过希望日后 Google 能够再改回来,如果这么好的一个工具只能在 Google 自家网站上嵌入使用,那也太操蛋了。
    3 replies    1970-01-01 08:00:00 +08:00
    ch_linghu
        1
    ch_linghu  
       Jan 18, 2013
    我觉得它是希望用API而不是嵌入方式使用吧。

    https://developers.google.com/google-apps/tasks/
    gateswong
        2
    gateswong  
       Jan 18, 2013
    我写了一个脚本,和你的脚本配合使用,可以在GTask的页面上继续使用。
    http://www.v2ex.com/t/58012
    greatghoul
        3
    greatghoul  
    OP
       Jan 21, 2013
    @gateswong 太棒了,又可以合体了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1637 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 16:31 · PVG 00:31 · LAX 09:31 · JFK 12:31
    ♥ Do have faith in what you're doing.