From cc2cdaa76bccc51aa8469c0c6a862ab0d115d802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Sat, 12 Apr 2025 20:15:50 +0800 Subject: [PATCH] fix: test --- pkg/nginx/data.go | 2 +- pkg/nginx/testdata/http.conf | 6 +++--- pkg/nginx/testdata/https.conf | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/nginx/data.go b/pkg/nginx/data.go index f0a2457d..569cf6c6 100644 --- a/pkg/nginx/data.go +++ b/pkg/nginx/data.go @@ -23,7 +23,7 @@ const DefaultConf = `server { access_log /dev/null; error_log /dev/null; } - # Deny access to sensitive directories + # Deny some sensitive directories location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.env) { return 404; } diff --git a/pkg/nginx/testdata/http.conf b/pkg/nginx/testdata/http.conf index 72e0bafb..62ff82e3 100644 --- a/pkg/nginx/testdata/http.conf +++ b/pkg/nginx/testdata/http.conf @@ -3,10 +3,10 @@ server { server_name localhost; index index.php index.html index.htm; root /www/wwwroot/default; - # 错误页配置 + # Error page configuration error_page 404 /404.html; include enable-php-0.conf; - # 不记录静态文件日志 + # Do not log static files location ~ .*\.(bmp|jpg|jpeg|png|gif|svg|ico|tiff|webp|avif|heif|heic|jxl)$ { expires 30d; access_log /dev/null; @@ -17,7 +17,7 @@ server { access_log /dev/null; error_log /dev/null; } - # 禁止部分敏感目录 + # Deny some sensitive directories location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.env) { return 404; } diff --git a/pkg/nginx/testdata/https.conf b/pkg/nginx/testdata/https.conf index 86292622..00ca9863 100644 --- a/pkg/nginx/testdata/https.conf +++ b/pkg/nginx/testdata/https.conf @@ -11,10 +11,10 @@ server { ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305; ssl_prefer_server_ciphers off; ssl_early_data on; - # 错误页配置 + # Error page configuration error_page 404 /404.html; include enable-php-0.conf; - # 不记录静态文件日志 + # Do not log static files location ~ .*\.(bmp|jpg|jpeg|png|gif|svg|ico|tiff|webp|avif|heif|heic|jxl)$ { expires 30d; access_log /dev/null; @@ -25,7 +25,7 @@ server { access_log /dev/null; error_log /dev/null; } - # 禁止部分敏感目录 + # Deny some sensitive directories location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.env) { return 404; }