Are DEPLOY_URL, DEPLOY_PRIME_URL available outside of netlify.toml?


I know we can use $DEPOY_URL and friends inside netlify.toml's build command settings.

Ideally I would love to be able to use such variables from within functions.

My use case requires calling an absolute permalink from within a Lambda Function and I’d rather use a dynamic solution à la process.env.DEPLOY_PRIME_URL which would securely use the right URL regardless of context.

1 Like

Hi @regisphilibert , this is something that we are working on adding. At the moment the only environment variables available inside of functions are those specified in the UI.


Got it! Thanks @futuregerald.

1 Like

Oh actually you can already, just not sure how stable it is but it lives inside process.env.DEPLOY_URL alongside process.env.URL

1 Like