Skip to content

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

Activate

Fang-Pen Lin668abeb47b20
diff --git a/backend/src/server/routes/v1/bdd-nock-router.ts b/backend/src/server/routes/v1/bdd-nock-router.ts
index 91e74919c7..e8e0b06a16 100644
--- a/backend/src/server/routes/v1/bdd-nock-router.ts
+++ b/backend/src/server/routes/v1/bdd-nock-router.ts
@@ -34,7 +34,9 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {
logger.info(definitions, "Defining nock");
nock.define(definitions as Definition[]);
// Ensure we are activating the nocks, because we could have called `nock.restore()` before this call.
- nock.activate();
+ if (!nock.isActive()) {
+ nock.activate();
+ }
return { status: "ok" };
}
});