From 4837024d8cd40e31bb4b95cbeec0ae473dfca4e3 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 11 十一月 2026 16:26:31 +0800
Subject: [PATCH] 新增 目录过滤器。增加对敏感目录的管控。
---
appsettings.json | 34 ++++++++++++++++++++++++++++++----
1 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/appsettings.json b/appsettings.json
index 6e9de47..2b780cb 100644
--- a/appsettings.json
+++ b/appsettings.json
@@ -6,15 +6,38 @@
}
},
"AllowedHosts": "*",
+ "Gateway": {
+ "FileFilter": {
+ "Enabled": true,
+ "BlockedExtensions": [ ".dll", ".log", ".config" ]
+ },
+ "FolderFilter": {
+ "Enabled": true,
+ // BlockedFolders 涓殑key 鍏ㄩ儴閰嶇疆涓哄皬鍐欏瓧姣�
+ "BlockedFolders": {
+ "bin": 1,
+ "obj": 1,
+ "vlog": 1,
+ "dll": 1,
+ "PageLogs": 1
+ }
+ },
+ "ErrorPage": {
+ "Enabled": true,
+ "LogPageEnabled": true,
+ "LogPageDirectory": "PageLogs"
+ }
+ },
"ReverseProxy": {
"Routes": {
"mes-backend": {
"ClusterId": "mes-backend",
+ "CorsPolicy": "frontend-dev",
"Match": {
- "Path": "/API_NW/{**catch-all}"
+ "Path": "/API/{**catch-all}"
},
"Transforms": [
- { "PathRemovePrefix": "/API_NW" }
+ //{ "PathRemovePrefix": "/API" }
]
}
},
@@ -22,10 +45,13 @@
"mes-backend": {
"Destinations": {
"backend": {
- "Address": "http://localhost:8090"
+ "Address": "http://127.0.0.1:81"
}
}
}
}
+ // 娉ㄦ剰锛歒ARP 娌℃湁 "CorsPolicies" 杩欎釜閰嶇疆鑺傦紙鍐欎簡涔熶細琚潤榛樺拷鐣ワ級銆�
+ // 璺敱涓婄殑 "CorsPolicy" 鍙槸绛栫暐鍚嶏紝鐪熸鐨勭瓥鐣ュ畾涔夊湪 Program.cs 鐨� AddCors(...) 閲岋紝
+ // 涓ゅ鍚嶅瓧蹇呴』瀹屽叏涓�鑷淬��
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.1