We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18fffd1 commit 5dc174eCopy full SHA for 5dc174e
apps/webapp/app/env.server.ts
@@ -23,7 +23,12 @@ const EnvironmentSchema = z.object({
23
DATABASE_READ_REPLICA_URL: z.string().optional(),
24
SESSION_SECRET: z.string(),
25
MAGIC_LINK_SECRET: z.string(),
26
- ENCRYPTION_KEY: z.string(),
+ ENCRYPTION_KEY: z
27
+ .string()
28
+ .refine(
29
+ (val) => Buffer.from(val, "utf8").length === 32,
30
+ "ENCRYPTION_KEY must be exactly 32 bytes"
31
+ ),
32
WHITELISTED_EMAILS: z
33
.string()
34
.refine(isValidRegex, "WHITELISTED_EMAILS must be a valid regex.")
0 commit comments