fix: 浏览器扩展 Open API 改经 Background 代发,修复 HTTPS 页面混合内容拦截

This commit is contained in:
2026-08-26 14:14:18 +08:00
parent 216536815c
commit 928bfb19a3
12 changed files with 180 additions and 70 deletions
+3 -1
View File
@@ -72,9 +72,11 @@ Popup 右上角「配置」:
| 项 | 说明 |
|----|------|
| Base URL | 例 `http://localhost:8080/api`(不要末尾 `/`) |
| Base URL | 例 `http://localhost:8080/api`(**直连后端**,不要用前端 dev 的 `5666`;不要末尾 `/`) |
| API Key | 后台创建的 Open API Key(`sk_...`),**不要**填登录 JWT |
Open API 请求由 **Background Service Worker 代发**(Content Script 在 HTTPS 拼多多页内不能直连 `http://localhost`,会被混合内容/CORS 拦截,Network 里常无 HTTP 状态码)。
Key 建议具备:
- `open:extension:feature:read`(功能清单/脚本)