From 7803a95d9de15764c2e77cbda551794d07d2b97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Kerti?= <47832952+kkerti@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:11:36 +0200 Subject: [PATCH 1/4] kk changed secret key format --- functions/src/publicCloudQueries.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/publicCloudQueries.ts b/functions/src/publicCloudQueries.ts index b4f27ec..3dc9b66 100644 --- a/functions/src/publicCloudQueries.ts +++ b/functions/src/publicCloudQueries.ts @@ -3,7 +3,7 @@ import * as admin from "firebase-admin"; import { onRequest, Request } from "firebase-functions/v2/https"; import { defineSecret } from "firebase-functions/params"; import { SecretParam } from "firebase-functions/lib/params/types"; -const intechstudioApiKey = defineSecret("X-INTECHSTUDIO-KEY"); +const intechstudioApiKey = defineSecret("X_INTECHSTUDIO_KEY"); admin.initializeApp(); const db = admin.firestore(); @@ -15,7 +15,7 @@ function validateApiKey( ) { // Get the API key from request headers const requestApiKey = - req.headers["x-intechstudio-key"] || + req.headers["x_intechstudio_key"] || req.get("Authorization")?.replace("Bearer ", ""); // Get the expected API key from secret From bafdb179a61803d5cdd1f7dc6ba2e12c02b788a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Kerti?= <47832952+kkerti@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:16:28 +0200 Subject: [PATCH 2/4] kk do not require linting on firebase functions --- firebase.json | 1 - 1 file changed, 1 deletion(-) diff --git a/firebase.json b/firebase.json index 9b424de..c1a8943 100644 --- a/firebase.json +++ b/firebase.json @@ -49,7 +49,6 @@ "firebase-debug.*.log" ], "predeploy": [ - "npm --prefix \"$RESOURCE_DIR\" run lint", "npm --prefix \"$RESOURCE_DIR\" run build" ] } From b064785ef90cddaa90a8264f387a463e672b45db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Kerti?= <47832952+kkerti@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:18:24 +0200 Subject: [PATCH 3/4] kk format --- firebase.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/firebase.json b/firebase.json index c1a8943..29279c0 100644 --- a/firebase.json +++ b/firebase.json @@ -48,9 +48,7 @@ "firebase-debug.log", "firebase-debug.*.log" ], - "predeploy": [ - "npm --prefix \"$RESOURCE_DIR\" run build" - ] + "predeploy": ["npm --prefix \"$RESOURCE_DIR\" run build"] } ] } From 5e67118287a2ca4fa507e4bf2ce60e0b931bce53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Kerti?= <47832952+kkerti@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:38:55 +0200 Subject: [PATCH 4/4] kk upadated scheduler to firebase:functions v2 --- functions/src/firestoreBackup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/src/firestoreBackup.ts b/functions/src/firestoreBackup.ts index 0e68907..cb748ad 100644 --- a/functions/src/firestoreBackup.ts +++ b/functions/src/firestoreBackup.ts @@ -1,5 +1,5 @@ import * as firestore from "@google-cloud/firestore"; -import { onSchedule } from "firebase-functions/scheduler"; +import { onSchedule } from "firebase-functions/v2/scheduler"; const bucket = "gs://profile-cloud-firestore-backup"; const client = new firestore.v1.FirestoreAdminClient();