// Angular dev-server proxy for portal-admin. // // Mirrors apps/portal-shell/proxy.conf.js โ€” same rationale, same // `/api โ†’ ${BFF_TARGET:-http://localhost:3000}` rule. The admin app // talks to the same BFF (ADR-0020 ยง"Where does the admin app live"), // just at admin-specific paths under `/api/admin/...`; the proxy // match on `/api` covers both surfaces. // // JS form deliberate โ€” only this form can read `process.env` so the // Docker / native target swap (BFF_TARGET in dev.compose.yml) works // without a rebuild. const target = process.env['BFF_TARGET'] ?? 'http://localhost:3000'; module.exports = { '/api': { target, secure: false, changeOrigin: true, }, };