0

我正在尝试在我的 Angular 应用程序上实现各种站点插件,但遇到了一些问题。

以 Calendly 为例。要在他们的网站上实施建议是添加以下代码片段:

  <!-- Calendly link widget begin -->
<link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet">
<script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript"></script>
<a href="" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/mycalendar'});return false;">Schedule time with me</a>
<!-- Calendly link widget end -->

这显然有一些关于 Angular 的问题——所以我将https://assets.calendly.com/assets/external/widget.js作为文件托管在项目中并实现了它,以便可以从我的组件中访问它。

当 js 尝试向 Calendly 发出请求时,问题就出现了 - 我收到此错误:

A cookie associated with a cross-site resource at https://calendly.com/ was set without the `SameSite` attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

我希望有办法解决这个问题,不用像云函数那样编写我自己的实现来避免它?

任何帮助将不胜感激!

4

0 回答 0