I have a worker that has both variables and secrets in the "Settings" panel for Worker Builds. In production builds everything's fine, but in preview builds, secrets appear empty. To check that I added an
env
env
call before builds and logging in the js code. This is what I see:
API_BASEURL=https://****/api/API_SECRET_KEY=...Error: Invalid baseUrl or secretKey ("https://****/api/", "")
API_BASEURL=https://****/api/API_SECRET_KEY=...Error: Invalid baseUrl or secretKey ("https://****/api/", "")