How access environment variables from a Framework Components in Astro?

Viewed 24

I'm working in a project using Astro and I am using a component with VUE. For this project I need to access some env vars.

I am able to access from the Astro templates, but I can't find a way to get in the VUE component. Is this possible?

1 Answers

There is no way to do this without exposing the environment variables.

To do this, we have to move the function to an endpoint of our API that runs on the server side and make a request to execute it safely.

Related