update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
|
|
@ -0,0 +1,34 @@
|
|||
# ADR-001: Zweistufiges Domain- & Session-Handling
|
||||
|
||||
## Kontext
|
||||
|
||||
Die bestehende Middleware/Provider-Logik greift in Teilen vor `StartSession` auf Session-Daten zu. Das führt in Randfällen zu doppelt erzeugten Sessions und inkonsistentem `user_shop`-Zustand.
|
||||
|
||||
## Entscheidung
|
||||
|
||||
Wir trennen strikt in zwei Phasen:
|
||||
|
||||
1. DomainBootstrap (früh, rein):
|
||||
|
||||
- Host parsen → `DomainContext`
|
||||
- `config('session.domain')` + `config('app.url')` setzen
|
||||
- KEIN Sessionzugriff
|
||||
|
||||
2. DomainSessionSync (spät, zustandsvoll):
|
||||
- Session ist aktiv
|
||||
- `UserShopSessionManager` synchronisiert `user_shop` in Session und Cookie
|
||||
|
||||
## Alternativen
|
||||
|
||||
- Alles in einer Middleware: führt zu Sessionzugriff vor `StartSession` oder verspäteter Setzung von `session.domain`
|
||||
- Nur Cookies, keine Session: bricht vorhandene Annahmen in Views/Controllern
|
||||
|
||||
## Konsequenzen
|
||||
|
||||
- Keine doppelten Sessions durch frühe Zugriffe
|
||||
- Sticky-Shop über Subdomains stabil
|
||||
- Optionale Abwärtskompatibilität via Legacy-Session-Keys
|
||||
|
||||
## Status
|
||||
|
||||
Prototyp in `dev/subdomain-optimization-gpt-5` abgelegt. Schrittweise Integration empfohlen.
|
||||
Loading…
Add table
Add a link
Reference in a new issue