refactor: remove unused style-src directive from content security policy in manifest
Some checks failed
构建扩展程序 / 构建扩展程序 (push) Successful in 1m8s
构建扩展程序 / 发布至 Chrome 应用商店 (push) Failing after 31s

This commit is contained in:
Astrian Zheng 2025-05-28 15:02:23 +10:00
parent 1ab08ffcb0
commit af9ff7410b
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -21,7 +21,6 @@ function processManifest() {
// 移除 CSP 中的本地开发相关配置
manifest.content_security_policy.extension_pages = manifest.content_security_policy.extension_pages
.replace(/script-src 'self' http:\/\/localhost:5173;\s*/g, '')
.replace(/style-src 'self' 'unsafe-inline';\s*/g, '')
.replace(/\s*http:\/\/localhost:5173\s*/g, ' ')
.replace(/\s*ws:\/\/localhost:5173\s*/g, ' ')
.replace(/;\s+/g, '; ') // 标准化分号后的空格