我想在我的网络应用程序中添加谷歌地图(嵌入)地图。我正在构建 Angular 8 并使用内置服务器,但仍在 console.log 中显示警告
A cookie associated with a cross-site resource at https://google.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review coo...
Run Code Online (Sandbox Code Playgroud)
我在 ngOnInit 方法的代码中所做的事情,我已经添加了这个
this.cookieService.set('cross-site-cookie',"bar");
this.cookieService.set('SameSite','SameSite=None; Secure');
Run Code Online (Sandbox Code Playgroud)
上面的代码我使用名为 ngx-cookie-service 的 npm 包。另外,当我自己参考这个网站时
https://github.com/GoogleChromeLabs/samesite-examples/blob/master/javascript.md
Run Code Online (Sandbox Code Playgroud)
我不确定我做对了还是错了。我所做的只是使用我所在的谷歌地图的“复制链接”完全复制。如何解决这个问题。