From 4b582d4d07a9bd29d28c67a3ad782e605899200a Mon Sep 17 00:00:00 2001 From: huangfeng Date: Thu, 3 Apr 2025 09:50:26 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=89=E5=85=A8=E5=A4=B4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ncac/package/cac.conf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ncac/package/cac.conf b/ncac/package/cac.conf index 274e7cb..2f4732d 100644 --- a/ncac/package/cac.conf +++ b/ncac/package/cac.conf @@ -4,7 +4,15 @@ server { # 安全头配置 add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-ancestors 'none';" always; + add_header Content-Security-Policy + "default-src 'self'; + connect-src 'self' data:; + script-src 'self' 'unsafe-inline' 'unsafe-eval'; + worker-src 'self' blob:; + img-src 'self' data:; + style-src 'self' 'unsafe-inline'; + font-src 'self'; + frame-ancestors 'none';" always; add_header X-Frame-Options "SAMEORIGIN" always; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";