# 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.