fix: Desktop app login issues and rename version check and host manager folder

This commit is contained in:
LukeGus
2025-11-01 20:46:40 -05:00
parent 73144fb0a0
commit 994d00e91f
10 changed files with 99 additions and 119 deletions

View File

@@ -68,7 +68,7 @@ app.use(
return callback(null, true);
}
callback(null, true);
callback(new Error("Not allowed by CORS"));
},
credentials: true,
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
@@ -77,6 +77,8 @@ app.use(
"Authorization",
"User-Agent",
"X-Electron-App",
"Accept",
"Origin",
],
}),
);

View File

@@ -44,10 +44,10 @@ function parseElectronUserAgent(userAgent: string): DeviceInfo {
let os = "Unknown OS";
let version = "Unknown";
const termixMatch = userAgent.match(/Termix-Desktop\/([\d.]+) \(([^;]+);/);
const termixMatch = userAgent.match(/Termix-Desktop\/([\d.]+)\s*\(([^;)]+)/);
if (termixMatch) {
version = termixMatch[1];
os = termixMatch[2];
os = termixMatch[2].trim();
} else {
if (userAgent.includes("Windows")) {
os = parseWindowsVersion(userAgent);