fix: Desktop app login issues and rename version check and host manager folder
This commit is contained in:
@@ -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",
|
||||
],
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user