mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 04:27:29 +00:00
Try to see if we can avoid timestamp issue
This commit is contained in:
@@ -35,10 +35,10 @@ export const getDNSMadeEasyUrl = (path: string) => {
|
|||||||
export const makeDNSMadeEasyAuthHeaders = (
|
export const makeDNSMadeEasyAuthHeaders = (
|
||||||
apiKey: string,
|
apiKey: string,
|
||||||
secretKey: string,
|
secretKey: string,
|
||||||
currentDate: Date = new Date()
|
currentDate?: Date
|
||||||
): Record<string, string> => {
|
): Record<string, string> => {
|
||||||
// Format date as "Day, DD Mon YYYY HH:MM:SS GMT" (e.g., "Mon, 01 Jan 2024 12:00:00 GMT")
|
// Format date as "Day, DD Mon YYYY HH:MM:SS GMT" (e.g., "Mon, 01 Jan 2024 12:00:00 GMT")
|
||||||
const requestDate = currentDate.toUTCString();
|
const requestDate = (currentDate ?? new Date()).toUTCString();
|
||||||
|
|
||||||
// Generate HMAC-SHA1 signature
|
// Generate HMAC-SHA1 signature
|
||||||
const hmac = crypto.nativeCrypto.createHmac("sha1", secretKey);
|
const hmac = crypto.nativeCrypto.createHmac("sha1", secretKey);
|
||||||
|
|||||||
Reference in New Issue
Block a user