From a261ab79c9c521e176572d97b4ad7a31cf9e8111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Sun, 15 Dec 2024 00:05:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(security):=20nginx.conf=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AE=89=E5=85=A8=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/pig-ui.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/pig-ui.conf b/docker/pig-ui.conf index 701a20aa..d2332630 100755 --- a/docker/pig-ui.conf +++ b/docker/pig-ui.conf @@ -28,4 +28,9 @@ server { proxy_set_header Host $http_host; proxy_set_header from ""; } + + # 屏蔽所有敏感路径,不用改代码 + location ~* ^/(actuator|swagger-ui|v3/api-docs|swagger-resources|webjars|doc.html) { + return 403; # 禁止访问 + } }