From af9ff7410b80abaec1ee38d1c970b93bfba13cfe Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Wed, 28 May 2025 15:02:23 +1000 Subject: [PATCH] refactor: remove unused style-src directive from content security policy in manifest --- scripts/prebuild.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/prebuild.js b/scripts/prebuild.js index c1d3262..fe5a3a3 100644 --- a/scripts/prebuild.js +++ b/scripts/prebuild.js @@ -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, '; ') // 标准化分号后的空格