You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Hydrogen v1 docs don't give much/any guidance around using environment variables in a project: https://shopify.github.io/hydrogen-v1/
For example, I would like to make a fetch request to a 3rd party API that requires authentication headers. The request would be made via a server-side Hydrogen /api route that I call from a client component. As such, I would like to put the auth token for this request in an environment variable that gets interpolated at runtime.
I've seen some other conversations in the old issues for this project discussing Vite env vars, and oddness with Oxygen, but I'm not sure where things ended up landing and I'd like to get the latest recommendation.
The text was updated successfully, but these errors were encountered:
Describe the bug
The Hydrogen v1 docs don't give much/any guidance around using environment variables in a project:
https://shopify.github.io/hydrogen-v1/
For example, I would like to make a fetch request to a 3rd party API that requires authentication headers. The request would be made via a server-side Hydrogen /api route that I call from a client component. As such, I would like to put the auth token for this request in an environment variable that gets interpolated at runtime.
I've seen some other conversations in the old issues for this project discussing Vite env vars, and oddness with Oxygen, but I'm not sure where things ended up landing and I'd like to get the latest recommendation.
The text was updated successfully, but these errors were encountered: