mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 15:45:23 +00:00
feat: rebuild desktop sync as linked server accounts, fix packaged plugin bundles and UI scaling
This commit is contained in:
1 parent
7c02daccf4
commit
6cd9a2846d
242 files changed
+39127
-8558
No files matched your search
@@ -21,6 +21,17 @@ export function isLoopbackRequest(req: Request): boolean {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this backend may hand out the desktop auto-session at all: the
|
||||
* embedded desktop backend, or a development backend the desktop app points
|
||||
* at. A production server never does, whoever asks.
|
||||
*/
|
||||
export function allowsDesktopAutoSession(
|
||||
env: NodeJS.ProcessEnv = process.env,
|
||||
): boolean {
|
||||
return env.ELECTRON_EMBEDDED === "true" || env.NODE_ENV !== "production";
|
||||
}
|
||||
|
||||
export function extractBearerOrCookieToken(req: Request): string | undefined {
|
||||
const cookieToken = (req as Request & { cookies?: Record<string, string> })
|
||||
.cookies?.jwt;
|
||||
|
||||
Reference in new issue
Block a user