Skip to content
← Back to Changelog

Wednesday, May 24th 2023

More flexible Environment Variables in Edge Functions and Middleware

Posted by

Avatar for javivelasco

Javi Velasco

Software Engineer, Infrastructure

Avatar for schniz

Gal Schlezinger

Software Engineer, Infrastructure

You now have more flexible access and improved limits for environment variables from Edge Functions and Middleware:

  • The max environment variable size is now 64KB instead of 5KB, same as Serverless Functions.
  • Other than the reserved names, there are no additional restrictions to name environment variables.
  • Accessing process.env is no longer restricted to be statically analyzable. This means that, for example, you can now compute variable names such as process.env[`${PREFIX}_SECRET`].

Check out the documentation to learn more.