mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix: improve DATABASE_URL validation in web environment schema
This commit is contained in:
Vendored
+5
-4
@@ -11,10 +11,11 @@ const webEnvSchema = z.object({
|
|||||||
NEXT_PUBLIC_MARBLE_API_URL: z.url(),
|
NEXT_PUBLIC_MARBLE_API_URL: z.url(),
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
DATABASE_URL: z
|
DATABASE_URL: z.string().refine(
|
||||||
.string()
|
(url) =>
|
||||||
.startsWith("postgres://")
|
url.startsWith("postgres://") || url.startsWith("postgresql://"),
|
||||||
.or(z.string().startsWith("postgresql://")),
|
"DATABASE_URL must be a postgres:// or postgresql:// URL",
|
||||||
|
),
|
||||||
|
|
||||||
BETTER_AUTH_SECRET: z.string(),
|
BETTER_AUTH_SECRET: z.string(),
|
||||||
UPSTASH_REDIS_REST_URL: z.url(),
|
UPSTASH_REDIS_REST_URL: z.url(),
|
||||||
|
|||||||
Reference in New Issue
Block a user