- Reintroduced conditional logic for the base URL to switch between local and production endpoints based on the environment.