feat(F-158): completed feature

This commit is contained in:
chattie
2026-08-22 17:50:55 +02:00
parent 7159baf851
commit 3e1a447e43
16 changed files with 348 additions and 77 deletions

View File

@@ -0,0 +1,20 @@
# F-158 — Diseño
## Decisión
Separar explícitamente URL pública y URL privada:
- Navegador POS: siempre usa `/api` del mismo origen (`:3006`).
- Route handler Next.js: usa `POS_BACKEND_URL`, server-only, con fallback `http://127.0.0.1:3000`.
- No exponer ni incrustar `NEXT_PUBLIC_API_URL` en el bundle.
## Proxy
- Construye destino desde el catch-all path y query string.
- Reenvía Cookie, Content-Type y `x-terminal-id`.
- Propaga status, Content-Type y todos los `Set-Cookie` del backend.
- GET y POST cubren las operaciones actuales del cliente POS.
## Desarrollo LAN
`allowedDevOrigins` incluye `192.168.18.93` y `localhost` para recursos Next/HMR.
## Seguridad
La URL backend queda server-only. Los paths proceden del segmento catch-all y se concatenan contra una base fija, sin aceptar host suministrado por el cliente.