diff --git a/src/services/api-server.js b/src/services/api-server.js
index 4793776..5e0da81 100644
--- a/src/services/api-server.js
+++ b/src/services/api-server.js
@@ -428,7 +428,7 @@ async function startServer() {
logger.info('[ScheduledHealthCheck] Running scheduled health check on startup...');
setTimeout(async () => {
try {
- await poolManager.performScheduledHealthChecks();
+ await poolManager.performHealthChecks();
} catch (error) {
logger.error('[ScheduledHealthCheck] Startup run error:', error);
}
diff --git a/src/ui-modules/config-api.js b/src/ui-modules/config-api.js
index b6a796c..d39b028 100644
--- a/src/ui-modules/config-api.js
+++ b/src/ui-modules/config-api.js
@@ -134,9 +134,10 @@ export async function handleUpdateConfig(req, res, currentConfig) {
const relativePath = path.relative(cwd, resolved);
const isInsideCwd = !path.isAbsolute(relativePath) && !relativePath.startsWith('..') && relativePath !== '..';
- // Windows 大小写不敏感兼容:统一转换为小写比较
- const normalizedResolved = resolved.toLowerCase().replace(/\\/g, '/');
- const normalizedCwd = cwd.toLowerCase().replace(/\\/g, '/');
+ // Windows 大小写不敏感兼容:仅在 Windows 平台统一转换为小写比较
+ const isWindows = process.platform === 'win32';
+ const normalizedResolved = (isWindows ? resolved.toLowerCase() : resolved).replace(/\\/g, '/');
+ const normalizedCwd = (isWindows ? cwd.toLowerCase() : cwd).replace(/\\/g, '/');
const startsWithCwd = normalizedResolved.startsWith(normalizedCwd + '/') || normalizedResolved === normalizedCwd;
if (isInsideCwd && startsWithCwd) {
@@ -188,9 +189,10 @@ export async function handleUpdateConfig(req, res, currentConfig) {
const relativePath = path.relative(cwd, resolved);
const isInsideCwd = !path.isAbsolute(relativePath) && !relativePath.startsWith('..') && relativePath !== '..';
- // Windows 大小写不敏感兼容:统一转换为小写比较
- const normalizedResolved = resolved.toLowerCase().replace(/\\/g, '/');
- const normalizedCwd = cwd.toLowerCase().replace(/\\/g, '/');
+ // Windows 大小写不敏感兼容:仅在 Windows 平台统一转换为小写比较
+ const isWindows = process.platform === 'win32';
+ const normalizedResolved = (isWindows ? resolved.toLowerCase() : resolved).replace(/\\/g, '/');
+ const normalizedCwd = (isWindows ? cwd.toLowerCase() : cwd).replace(/\\/g, '/');
const startsWithCwd = normalizedResolved.startsWith(normalizedCwd + '/') || normalizedResolved === normalizedCwd;
if (isInsideCwd && startsWithCwd) {
diff --git a/src/ui-modules/provider-api.js b/src/ui-modules/provider-api.js
index 09beaf4..1d4cf3d 100644
--- a/src/ui-modules/provider-api.js
+++ b/src/ui-modules/provider-api.js
@@ -14,14 +14,22 @@ function sanitizeProviderData(provider) {
const sanitized = { ...provider };
if (typeof sanitized.customName === 'string') {
let name = sanitized.customName;
- // 拒绝包含 data: 协议(可能包含内嵌恶意内容)
- if (/data\s*:/i.test(name)) return sanitized;
- // 移除 (支持跨行匹配)
- name = name.replace(/