Versie 1.0.0 in package.json en README-badge, no-store op de API

This commit is contained in:
Jordy Hoogeveen
2026-09-09 21:59:18 +02:00
parent 71cb9b9449
commit 09cc6ae488
6 changed files with 36 additions and 3 deletions
+9
View File
@@ -68,6 +68,15 @@ describe("API", () => {
assert.equal(body.latest, null);
assert.equal(body.disabled, true);
});
// Zonder expliciete header bepaalt de browser zelf hoe lang hij een
// API-antwoord hergebruikt, en dat verschilt per browser.
it("API-antwoorden komen nooit uit de browsercache", async () => {
for (const pad of ["/api/health", "/api/update-check", "/api/bestaat-niet"]) {
const res = await fetch(`${basis}${pad}`);
assert.match(res.headers.get("cache-control") ?? "", /no-store/, pad);
}
});
});
describe("Frontend serveren", () => {