fix: Sprachnotizen nach Browserprüfung (Wiedergabe, Fokus, Warteschlange)
- 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]>
This commit is contained in:
1 parent
e0be687b7c
commit
92323197a7
16 files changed
+314
-119
No files matched your search
@@ -0,0 +1,19 @@
|
||||
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'");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user