- CSP erlaubt media-src 'self' blob:, damit die eigene Aufnahme abspielbar ist; Dauer kommt vom Recorder statt aus den Metadaten - Fokus nach gesperrtem Mikrofon auf der Hilfe, nach Verwerfen in /voice auf der Liste - automatisch beendete Aufnahme läuft über denselben Speicherweg wie Senden, kein zweites Speichern; Volk und Datum bleiben bis „Noch eine Aufnahme“ gesperrt - Offline-Band öffnet die Warteschlange auch ohne Ablehnung, wenn Sprachnotizen warten; leere Liste offline mit Text - Abmelde-Dialog und Zurück-Link mit 56 px, Schließen-Knopf der Dialoge 44 px Gates: Frontend lint, typecheck, 2991 Tests, build. Refs #27 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
20 lines
645 B
TypeScript
20 lines
645 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { proxy } from "./proxy";
|
|
|
|
function csp(): string {
|
|
return proxy().headers.get("Content-Security-Policy") ?? "";
|
|
}
|
|
|
|
describe("proxy security headers", () => {
|
|
it("lets the page play its own voice recordings (blob:) and nothing broader", () => {
|
|
const directives = csp().split(";").map((part) => part.trim());
|
|
|
|
expect(directives).toContain("media-src 'self' blob:");
|
|
expect(directives.filter((part) => part.startsWith("media-src"))).toHaveLength(1);
|
|
});
|
|
|
|
it("keeps the default of the same origin only", () => {
|
|
expect(csp()).toContain("default-src 'self'");
|
|
});
|
|
});
|