From 34d0b8cf73e4d29d1f30c861f0781a855a364207 Mon Sep 17 00:00:00 2001 From: Evgenii Alekseev Date: Fri, 13 Mar 2026 16:29:05 +0200 Subject: [PATCH] fix: fallback to timestamp in case if crypto context is not available Previous tests have been done in either secure (HTTPS) or loopback (localhost) environments, so I missed the case, that crypto methods might not be available Fixes #159 --- frontend/src/api/client/Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/client/Client.ts b/frontend/src/api/client/Client.ts index 296459ef..1dcdbcfe 100644 --- a/frontend/src/api/client/Client.ts +++ b/frontend/src/api/client/Client.ts @@ -40,7 +40,7 @@ export class Client { const headers: Record = { Accept: "application/json", - "X-Request-ID": crypto.randomUUID(), + "X-Request-ID": crypto.randomUUID?.() ?? Date.now().toString(), }; if (json !== undefined) { headers["Content-Type"] = "application/json";