PWA: Service Worker ohne Session erreichbar, nie HTTP-gecacht; authentifizierter Smoke
- proxy: /sw.js vom Session-Gate ausgenommen (Update-Prüfung auch bei abgelaufener Sitzung; enthält keine Mandantendaten) – gemeldet von L7 - next.config: /sw.js mit Cache-Control no-cache/no-store, Service-Worker-Allowed / - scripts/smoke-auth.ts: Session-Cookie über finalizeIdentityLogin + next-auth/jwt encode (ohne Passworteingabe), prüft Backoffice- und Monteur-Seiten Nachweis: /sw.js anonym 200 + no-cache; Smoke 19/19 Seiten grün. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,15 @@ const nextConfig: NextConfig = {
|
||||
// Later entries override same-named headers of earlier matches (Next.js header semantics).
|
||||
return [
|
||||
{ source: "/:path*", headers: securityHeaders },
|
||||
{
|
||||
// Browsers must revalidate the service worker on every navigation to pick up updates.
|
||||
source: "/sw.js",
|
||||
headers: [
|
||||
{ key: "Cache-Control", value: "no-cache, no-store, must-revalidate" },
|
||||
{ key: "Service-Worker-Allowed", value: "/" },
|
||||
{ key: "Content-Type", value: "application/javascript; charset=utf-8" },
|
||||
],
|
||||
},
|
||||
...EMBEDDABLE_FILE_ROUTES.map((source) => ({
|
||||
source,
|
||||
headers: [
|
||||
|
||||
Reference in New Issue
Block a user