Commit 7a590e5
committed
refactor: use relative URLs and centralize API endpoints
- Update Django URLs to serve all APIs under /api/ prefix
- Change frontend to use relative URLs (empty baseURL) instead of environment-specific domains
- Create centralized endpoints.ts for maintainable API URL management
- Update all frontend components to use centralized endpoints
- Remove all VITE_API_BASE_URL and REACT_APP_API_BASE_URL dependencies
- Add helper functions for dynamic endpoints with parameters
This ensures the same Docker image works in both production and sandbox
environments without requiring environment-specific configuration.
Fixes:
- Frontend calling old domain (balancer.live.k8s.phl.io)
- API calls failing after domain migration
- /login and /adminportal pages not working
Closes #4311 parent b8a3619 commit 7a590e5
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments