Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Try to see if we can avoid timestamp issue

Fang-Pen Lin13022adc5ec0
diff --git a/backend/src/services/app-connection/dns-made-easy/dns-made-easy-connection-fns.ts b/backend/src/services/app-connection/dns-made-easy/dns-made-easy-connection-fns.ts
index 850d5ac364..b66d6eb9cd 100644
--- a/backend/src/services/app-connection/dns-made-easy/dns-made-easy-connection-fns.ts
+++ b/backend/src/services/app-connection/dns-made-easy/dns-made-easy-connection-fns.ts
@@ -35,10 +35,10 @@ export const getDNSMadeEasyUrl = (path: string) => {
export const makeDNSMadeEasyAuthHeaders = (
apiKey: string,
secretKey: string,
- currentDate: Date = new Date()
+ currentDate?: Date
): Record<string, string> => {
// 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
const hmac = crypto.nativeCrypto.createHmac("sha1", secretKey);