chore: tools/live signs tickets as the dashboard does, M5 passed on test-filius
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-4
@@ -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) }) });
|
||||
|
||||
Reference in New Issue
Block a user