Open
Description
Describe the bug
Related to #2348
It seems Netlify Dev passes URL
and DEPLOY_URL
to functions, but in production we only pass URL
.
We'll need to figure out what built-in ones are passed to functions and add those to the CLI.
To Reproduce
- Clone the https://github.com/erezrokah/netlify-build-reproductions repo
- Switch to the
pr_2348
branch ntl init
ntl deploy
- Invoke the live function
https://cli-pr-2348--<site>.netlify.app/.netlify/functions/index
ntl dev
- Invoke the local function
http://localhost:8888/.netlify/functions/index
See that the live function only returns the URL
env variable and the local one returns DEPLOY_URL
.
System:
OS: macOS 11.3
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 1.00 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 7.11.1 - ~/.nvm/versions/node/v15.14.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
npmGlobalPackages:
netlify-cli: 3.29.2
Expected behavior
Prod an dev environment should match
Additional context
https://docs.netlify.com/configure-builds/environment-variables/