ソースを参照

update 优化 nginx 限制外网访问内网 actuator 相关路径

疯狂的狮子Li 4 年 前
コミット
58b8446416
1 ファイル変更5 行追加0 行削除
  1. 5 0
      docker/nginx/nginx.conf

+ 5 - 0
docker/nginx/nginx.conf

@@ -55,6 +55,11 @@ http {
         #     return 200 '{"msg":"演示模式,不允许操作","code":500}';
         # }
 
+        # 限制外网访问内网 actuator 相关路径
+        location ~ ^(/[^/]*)?/actuator(/.*)?$ {
+            return 403;
+        }
+
         location / {
             root   /usr/share/nginx/html;
             try_files $uri $uri/ /index.html;