Document hardcoded IPs in zpac-portal
This commit is contained in:
parent
af0f406e94
commit
64ba5e3bb6
21
SCRATCH/hardcoded-ips-portal.md
Normal file
21
SCRATCH/hardcoded-ips-portal.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Hardcoded IPs in zpac-portal — Need to Move to ENV
|
||||
|
||||
## All in one env var
|
||||
All four hardcoded IPs are fallbacks for `NEXT_PUBLIC_API_BASE_URL`.
|
||||
Just set this in `.env.local` and all four are fixed automatically:
|
||||
|
||||
```
|
||||
NEXT_PUBLIC_API_BASE_URL=http://<new-api-ip>:4000
|
||||
```
|
||||
|
||||
## Files affected
|
||||
| File | Fallback IP |
|
||||
|------|-------------|
|
||||
| src/app/(dashboard)/servers/page.tsx | 10.60.0.245:4000 |
|
||||
| src/app/(dashboard)/servers/console/ServerConsole.tsx | 10.60.0.245:4000 |
|
||||
| src/lib/api-client.ts | 10.60.0.245:4000 |
|
||||
| src/lib/api/legacy.ts | 10.60.0.245:4000 |
|
||||
|
||||
## Notes
|
||||
- No code changes needed — just set NEXT_PUBLIC_API_BASE_URL in .env.local
|
||||
- Consider removing the hardcoded fallbacks entirely post-migration so a missing env var fails loudly instead of silently using a wrong IP
|
||||
Loading…
Reference in New Issue
Block a user