This reproduces the issue causing INC-4
At UploadThing, we use AWS Secret Manager (SM) to mange environment variables throughout our different services. Most of these are provisioned through Terraform, but the dashboard app is still managed through Vercel's git integration.
The env-fetch.js file fetches the variable from SM, and then outputting to a .env.local
which gets picked up at the build-step.
At build, the env is present. When visiting /
, the env is present. But for our proxy route which forwards requests to api.uploadthing.com
, it somehow got lost... (try POST /edge
and see it error due to missing env):