The current implementation of the Xata client hardcodes the databaseURL:
const defaultOptions = { databaseURL: "https://..............................", apiKey: process.env.XATA_API_KEY, branch: "main", };
This is problematic because:
- It leaks workspace details publicly.
- It reduces flexibility for different environments (development, staging, production).
- It violates best practices for managing secrets and config values.
Use an environment variable instead to store the database url
The current implementation of the Xata client hardcodes the databaseURL:
const defaultOptions = { databaseURL: "https://..............................", apiKey: process.env.XATA_API_KEY, branch: "main", };This is problematic because:
Use an environment variable instead to store the database url