• 李文光's avatar
    fix(plugin): 采集插件跨域改走后台代理 + 后端地址动态授权 + 后端 CORS 放开 · 65c3cb13
    李文光 authored
    内容脚本跨域 fetch 改为经 background Service Worker 转发, 解决同步时本地服务未启动(Chrome MV3 内容脚本跨源请求始终按跨源处理, 即使有 host_permissions 也被 CORS 拦截)
    
    扩展新增 optional_host_permissions + 运行时 chrome.permissions.request 动态授权, 换后端地址只需在弹窗填新地址并点一次测试连接, 无需改 manifest
    
    后端 CORS 默认放宽为 *, 同步更新 test_static_security 的 Access-Control-Allow-Origin 断言
    65c3cb13
test_static_security.py 1.22 KB