gpt4 book ai didi

node.js - Electron 快速入门拒绝连接到 'https://oauth2.googleapis.com/token'

转载 作者:行者123 更新时间:2023-12-03 12:38:54 26 4
gpt4 key购买 nike

我正在尝试在 Electron 内部使用Google Drive API快速入门项目。这是我的示例项目:
electron quickstart with google api

how it should works:
when click authorize button, it'll redirected to authUrl then we can copy the authorization key, insert the authorization key page to input with id 'key'


当我用 Electron 运行时,它返回以下错误:
D:\koding\electron-example\gdrive\node_modules\gaxios\build\src\gaxios.js:68 Refused to connect to 'https://oauth2.googleapis.com/token' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
该如何解决呢?

最佳答案

从这个帖子回答refused-to-load-the-script-because-it-violates-the-following-content-security
我们需要指定内容安全性允许的地址类型

关于node.js - Electron 快速入门拒绝连接到 'https://oauth2.googleapis.com/token',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64382740/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com