Skip to content

Commit

Permalink
fix: NEXT_PUBLIC variable access (#94)
Browse files Browse the repository at this point in the history
Ensure that the `NEXT_PUBLIC_` variable is inlined during builds.

https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser

(The above link specifically talks about the browser, but the inlining of NEXT_PUBLIC variables also applies to middleware).
  • Loading branch information
ijxy authored Sep 26, 2024
1 parent be9e4fe commit d652c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/env-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const WORKOS_COOKIE_DOMAIN = getEnvVariable('WORKOS_COOKIE_DOMAIN');
const WORKOS_COOKIE_MAX_AGE = getEnvVariable('WORKOS_COOKIE_MAX_AGE');
const WORKOS_COOKIE_NAME = getEnvVariable('WORKOS_COOKIE_NAME');
const WORKOS_COOKIE_PASSWORD = getEnvVariable('WORKOS_COOKIE_PASSWORD') ?? '';
const WORKOS_REDIRECT_URI = getEnvVariable('NEXT_PUBLIC_WORKOS_REDIRECT_URI') ?? '';
const WORKOS_REDIRECT_URI = process.env.NEXT_PUBLIC_WORKOS_REDIRECT_URI ?? '';

export {
WORKOS_API_HOSTNAME,
Expand Down

0 comments on commit d652c43

Please sign in to comment.