@kb-labs/rest-api-app 2.96.0 → 2.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2593,7 +2593,7 @@ async function registerPluginSnapshotRoutes(server, config, registry) {
2593
2593
  };
2594
2594
  const ext = extname(filePath);
2595
2595
  const isEntry = filePath === "remoteEntry.js";
2596
- return reply.code(200).header("Content-Type", MIME[ext] ?? "application/octet-stream").header("Content-Length", statSync(fullPath).size).header("Cache-Control", isEntry ? "public, max-age=10, must-revalidate" : "public, max-age=31536000, immutable").send(createReadStream(fullPath));
2596
+ return reply.code(200).header("Content-Type", MIME[ext] ?? "application/octet-stream").header("Content-Length", statSync(fullPath).size).header("Cache-Control", isEntry ? "public, max-age=10, must-revalidate" : process.env.NODE_ENV === "production" ? "public, max-age=31536000, immutable" : "no-cache").send(createReadStream(fullPath));
2597
2597
  });
2598
2598
  server.get(`${basePath}/plugins/health`, async (_request, reply) => {
2599
2599
  try {