mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 08:27:36 +00:00
Merge pull request #3765 from Infisical/help-fix-frontend-cache-issue
disable caching for frontend assets
This commit is contained in:
@@ -57,9 +57,12 @@ export const registerServeUI = async (
|
|||||||
reply.callNotFound();
|
reply.callNotFound();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// reference: https://github.com/fastify/fastify-static?tab=readme-ov-file#managing-cache-control-headers
|
|
||||||
// to avoid ui bundle skew on new deployment
|
// This should help avoid caching any chunks (temp fix)
|
||||||
return reply.sendFile("index.html", { maxAge: 0, immutable: false });
|
void reply.header("Cache-Control", "no-cache, no-store, must-revalidate, private, max-age=0");
|
||||||
|
void reply.header("Pragma", "no-cache");
|
||||||
|
void reply.header("Expires", "0");
|
||||||
|
return reply.sendFile("index.html");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user