Skip to content

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

feat: added new cache control for index html

=672e4baec483
diff --git a/backend/src/server/plugins/serve-ui.ts b/backend/src/server/plugins/serve-ui.ts
index 9f91d9774e..22c0977260 100644
--- a/backend/src/server/plugins/serve-ui.ts
+++ b/backend/src/server/plugins/serve-ui.ts
@@ -57,7 +57,9 @@ export const registerServeUI = async (
reply.callNotFound();
return;
}
- return reply.sendFile("index.html");
+ // reference: https://github.com/fastify/fastify-static?tab=readme-ov-file#managing-cache-control-headers
+ // to avoid ui bundle skew on new deployment
+ return reply.sendFile("index.html", { maxAge: 0, immutable: false });
}
});
}