diff --git a/tools/live/lib.ts b/tools/live/lib.ts index 6f8b57c..f21ec99 100644 --- a/tools/live/lib.ts +++ b/tools/live/lib.ts @@ -22,11 +22,12 @@ const SECRET = env.FILIUS_TICKET_SECRET!; const KEY = env.FILIUS_SERVICE_KEY!; export const made: string[] = []; /** - * How many seconds before now the tickets are signed. F before - * TICKET_AHEAD_SECONDS refused a ticket from its future, and test-filius' - * clock was behind this machine's (886 ms, then 8 ms with NTP). + * How many seconds before now the tickets are signed (0: as the dashboard + * signs them). F before TICKET_AHEAD_SECONDS refused a ticket from its + * future, and test-filius' clock was behind this machine's (886 ms, then + * 8 ms with NTP); against such an F, 2 helps. */ -const SKEW_SECONDS = Number(process.env.SKEW_SECONDS ?? 2); +const SKEW_SECONDS = Number(process.env.SKEW_SECONDS ?? 0); export async function svc(method: string, path: string, body?: unknown): Promise<{ status: number; json: any }> { const r = await fetch(`${BASE}${path}`, { method, headers: { 'x-filius-service-key': KEY, 'content-type': 'application/json' }, ...(body === undefined ? {} : { body: JSON.stringify(body) }) });