fix: improve DATABASE_URL validation in web environment schema
This commit is contained in:
parent
0a6ede73ae
commit
b095862cc0
|
|
@ -11,10 +11,11 @@ const webEnvSchema = z.object({
|
|||
NEXT_PUBLIC_MARBLE_API_URL: z.url(),
|
||||
|
||||
// Server
|
||||
DATABASE_URL: z
|
||||
.string()
|
||||
.startsWith("postgres://")
|
||||
.or(z.string().startsWith("postgresql://")),
|
||||
DATABASE_URL: z.string().refine(
|
||||
(url) =>
|
||||
url.startsWith("postgres://") || url.startsWith("postgresql://"),
|
||||
"DATABASE_URL must be a postgres:// or postgresql:// URL",
|
||||
),
|
||||
|
||||
BETTER_AUTH_SECRET: z.string(),
|
||||
UPSTASH_REDIS_REST_URL: z.url(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue