Skip to content

Commit 048b200

Browse files
committed
fixed env variable checkign
1 parent c017207 commit 048b200

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/env.js

+12-8
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@ export const env = createEnv({
77
* isn't built with invalid env vars.
88
*/
99
server: {
10-
DATABASE_URL: z.string().url(),
10+
DATABASE_URL: z.string(),
1111
NODE_ENV: z
1212
.enum(["development", "test", "production"])
1313
.default("development"),
1414
NEXTAUTH_SECRET:
1515
process.env.NODE_ENV === "production"
1616
? z.string()
1717
: z.string().optional(),
18-
NEXTAUTH_URL: z.preprocess(
19-
// This makes Vercel deployments not fail if you don't set NEXTAUTH_URL
20-
// Since NextAuth.js automatically uses the VERCEL_URL if present.
21-
(str) => process.env.VERCEL_URL ?? str,
22-
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
23-
process.env.VERCEL ? z.string() : z.string().url(),
24-
),
18+
NEXTAUTH_URL: z.string().url(),
19+
//
20+
// We are no longer deploying to Vercel. Drift is Vercel v2.0 ;)
21+
//
22+
// NEXTAUTH_URL: z.preprocess(
23+
// // This makes Vercel deployments not fail if you don't set NEXTAUTH_URL
24+
// // Since NextAuth.js automatically uses the VERCEL_URL if present.
25+
// (str) => process.env.VERCEL_URL ?? str,
26+
// // VERCEL_URL doesn't include `https` so it cant be validated as a URL
27+
// process.env.VERCEL ? z.string() : z.string().url(),
28+
// ),
2529
ALLOWED_GROUP_SLUGS: z
2630
.string()
2731
.refine((i) => i.split(",").length > 0, {

0 commit comments

Comments
 (0)