添加到Google日历的动画的链接已停止工作

Len*_*art 5 google-calendar-api

我在网站上有一个链接,允许用户在他们的Google日历中添加ICS Feed.使用此代码:

http://www.google.com/calendar/render?cid=https://<etc>
Run Code Online (Sandbox Code Playgroud)

它工作了3 - 4年,但现在已经不行了.Google发给我的消息是:

This email address isn't associated with an active Google Calendar account: https://<etc>
Run Code Online (Sandbox Code Playgroud)

如果我手动输入ics feed,那么工作正常:Feed应该按原样解析.没有错误.

知道在哪里解决这个问题吗?

kla*_*dut 8

我也有这个问题。你解决了吗?

我的测试表明它在使用带有http 的URL 时有效,例如:

www.google.com/calendar/render?cid=http%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
Run Code Online (Sandbox Code Playgroud)

HTTPS,如:

www.google.com/calendar/render?cid=https%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
Run Code Online (Sandbox Code Playgroud)

我的解决方法是在链接中使用 http,但将其重定向到 Web 服务器中的 https。不是很优雅,但它有效。GET 不会被加密,但至少答案是。

编辑:实际上,如果您不通过查询字符串参数进行更多的身份验证,那么通过 http 而不是 https 发送 GET 可能会带来巨大的安全风险,这对于日历提要来说可能很困难。任何可以嗅探 GET 的人都可以自己通过 https 发送相同的请求。