webpush: enforce endpoint as a URL

This commit is contained in:
Alex Gleason 2024-10-12 22:58:29 -05:00
parent 3fa12e3ba5
commit b6925a5491
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -9,7 +9,7 @@ import { getTokenHash } from '@/utils/auth.ts';
const pushSubscribeSchema = z.object({ const pushSubscribeSchema = z.object({
subscription: z.object({ subscription: z.object({
endpoint: z.string(), endpoint: z.string().url(),
keys: z.object({ keys: z.object({
p256dh: z.string(), p256dh: z.string(),
auth: z.string(), auth: z.string(),