From 56d536289d7c8780ab26462745a7d7a54e768838 Mon Sep 17 00:00:00 2001 From: gogongxt Date: Thu, 5 Nov 2026 14:35:59 +0800 Subject: [PATCH] update --- images.gogongxt.com | 3 ++- tools.gogongxt.com | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/images.gogongxt.com b/images.gogongxt.com index 1dd36fa..0165bd7 100644 --- a/images.gogongxt.com +++ b/images.gogongxt.com @@ -2,7 +2,7 @@ server { listen 80; server_name images.gogongxt.com; location / { - client_max_body_size 512M; + client_max_body_size 55m; proxy_pass http://127.0.0.1:61021; proxy_set_header Connection $http_connection; proxy_set_header Upgrade $http_upgrade; @@ -16,4 +16,5 @@ server { ssl_certificate /etc/letsencrypt/live/images.gogongxt.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/images.gogongxt.com/privkey.pem; + add_header Strict-Transport-Security "max-age=31536000" always; } diff --git a/tools.gogongxt.com b/tools.gogongxt.com index 3c00528..c911b35 100644 --- a/tools.gogongxt.com +++ b/tools.gogongxt.com @@ -5,6 +5,11 @@ server { root /home/gogongxt/tools; index index.html; + # 禁止访问 .git / .env 等隐藏文件(放行 ACME 校验) + location ~ /\.(?!well-known) { + deny all; + } + # 静态文件直接返回 location / { try_files $uri $uri/ =404;