mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2026-07-22 01:15:25 -04:00
The NEXT_PUBLIC_ prefix is unnecessarily added to the environment variables, and the APP_KEY is in a public state.
#63
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fujita-h on GitHub (Jan 19, 2025).
Sumamry
Environment variables with
NEXT_PUBLIC_are expanded at build time, so they should not be assigned to credentials, etc.Current Behavior
NEXT_PUBLIC_APP_KEYis stored in the variable below.https://github.com/langgenius/webapp-conversation/blob/9d2d092e9e652c92bdf4234b18216b151ac2bd17/config/index.ts#L3
In addition, this
API_KEYis loaded in the client component.https://github.com/langgenius/webapp-conversation/blob/9d2d092e9e652c92bdf4234b18216b151ac2bd17/app/components/index.tsx#L22
This makes the
API_KEY(=APP_KEY) public.Depending on usage, API keys managed by Dify users may be leaked to third-party users.
Note
The Next.js documentation on this topic is here.
@zhaoxiaohai commented on GitHub (Feb 8, 2025):
I urgently need to solve this problem.