Skip to content

Commit

Permalink
feat: add regex to check API_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
aube-dev committed Sep 16, 2024
1 parent 2467fa2 commit 6068e0a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/constants/env.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { z } from 'zod';

export const clientEnvSchema = z.object({
API_URL: z.string(),
API_URL: z.string().regex(/^(.*[^/])$/g, {
message: 'API 주소는 슬래시(/)로 끝나지 않아야 합니다.',
}),
});

export const serverEnvSchema = z.object({
AUTH_COOKIE_SESSION_SECRET: z.string(),
API_URL: z.string(),
API_URL: z.string().regex(/^(.*[^/])$/g, {
message: 'API 주소는 슬래시(/)로 끝나지 않아야 합니다.',
}),
});

0 comments on commit 6068e0a

Please sign in to comment.