Hey, I’ve been trying to change an env var based on the context but I can’t seem to make it work. I need to be able to change the base url I’m using to hit my netlify functions in one of my branch deploys (preProd for me). I’m hitting my functions at ${process.env.REACT_APP_BASE_URL}/.netlify/functions/...
,
I’m using a Branch Deploy for my branch called preProd and have specified the following on my TOML file so in order to dynamically get the specific branch deploy base-url instead of the production one when I’m calling my functions:
[context.branch-deploy.environment]
REACT_APP_BASE_URL = "https://preprod--compassionate-noether-d8f677.netlify.app"
But it keeps getting overriden by the production context (the env var for which I have specified in the UI). I’m pretty sure there is something simple I am missing here. I’ve also tried specifying the exact name of the branch but to no avail:
[context.preProd.environment]
REACT_APP_BASE_URL = "https://preprod--compassionate-noether-d8f677.netlify.app"